Follow-up to 
http://lists.wfu.edu/pipermail/gretl-users/2016-May/011845.html

Here's a simple example of what I was talking about with the --input 
option:

<hansl>
function string my_plot_file (series y1, series y2, series x)
   string fname = "@dotdir/test.plt"
   outfile "@fname" --write
   print "plot '-' using 3:2 title 'fat line' w l lw 3, \
     '-' using 3:2 w p pt 5 notitle"
   print y1 x --byobs
   print "e"
   print y2 x --byobs
   print "e"
   outfile --close
   return fname
end function

open data9-7
series x = $obsmajor + ($obsminor - 1)/4
fname = my_plot_file(PRIME, UNEMP, x)
gnuplot --input="@fname" --output=display
remove("@fname")
</hansl>

Allin

Reply via email to