script for plotting church output