void setup (FILE * fp)
{
fprintf (fp,
#if ISOPYCNAL
"set pm3d map corners2color c2\n"
#else
"set pm3d map\n"
#endif
"# jet colormap\n"
"set palette defined ( 0 0 0 0.5647, 0.125 0 0.05882 1, 0.25"
" 0 0.5647 1, 0.375 0.05882 1 0.9333, 0.5 0.5647 1 0.4392, 0.625"
" 1 0.9333 0, 0.75 1 0.4392 0, 0.875 0.9333 0 0, 1 0.498 0 0 )\n"
"unset key\n"
"set xlabel 'x'\n"
"set ylabel 'depth'\n"
);
}
event gnuplot (t += step1)
{
static FILE * fp = popen ("gnuplot 2> /dev/null", "w");
if (i == 0)
setup (fp);
fprintf (fp,
"set term pngcairo font \",10\" size 1600,266\n"
"set xrange [0:4]\n"
"set yrange [-0.5:0.5]\n"
"set size ratio -1\n"
"unset ytics\n"
"set output 'gnuplot/plot-%0.2f.png'\n", t);
plot_density (fp);
}