In git and snapshots, the "data" argument for "plot" (a series, list
or matrix) has now been made optional. This allows use of "plot" for a
custom plot that uses formulae rather than a chunk of data.
literal set title 'CRRA utility'
literal set xlabel 'c'
literal set ylabel 'u(c)'
literal set xrange[1:3]
literal set key top left
printf "# literal lines = 1"
literal crra(x,s) = (x**(1-s) - 1)/(1-s)
printf "plot crra(x,0) t 'sigma=0', \\"
printf " log(x) t 'sigma=1', \\"
printf " crra(x,3) t 'sigma=3"
end plot --output=display
The effect of "# literal lines = 1" is that the crra() function
definition will be treated as something to be passed directly to
gnuplot, without any attempt at parsing it on gretl's part. So in the
gretl GUI we won't choke on that line, and the plot will be
Show replies by date