On Mon, 3 Oct 2011, artur bala wrote:
Hi,
I'm not sure what's going on there, but i'm using the following gnuplot line
command inside a function. The plot comes out like a beauty but gretl pops an
error message "Failed to parse gnuplot file".
By the way, can someone tell me how to break the following command into 2-3
lines (I tried with "\", "\\","/","//" with no
success :(
gnuplot 5 4 --matrix=my_data --with-lines --suppress-fitted {set title
'Lorenz Curve'; set grid; set yrange [0:1]; set xrange [0:1]; set xlabel
'percentage of cumulated population'; set ylabel 'percentage of cumulated
income'; show xlabel; show ylabel}
1. The line continuation character in gretl is '\', a single
backslash.
2. All the additional gnuplot commands inside {...} must be
terminated with a semi-colon; that's missing from your last
command.
3. You don't want to use "show xlabel" or "show ylabel". Look
at the gnuplot help to see what "show" does -- it's not what
you think!
So:
gnuplot 5 4 --matrix=my_data --with-lines --suppress-fitted \
--output=display {set title 'Lorenz Curve'; set grid; \
set yrange [0:1]; set xrange [0:1]; \
set xlabel 'percentage of cumulated population'; \
set ylabel 'percentage of cumulated income';}
Allin Cottrell