Reputation: 653
I tried to separate the gnuplot environment commands and the data plot command. The gnuplot script is:
set terminal postscript eps enhanced color
set output "/out.eps"
set size 0.80,0.80
...
...
load 'path/to/plot_command.txt
where plot_command.txt
has the following commands:
plot '< tail -7 /Data2.stat' using 1:2 title "Data2" with lp lw 4, \
'< tail -7 /Data3.stat' using 1:2 title "alnmindrepl07" with lp lw 4, \
....................................
However, I get the following error:
plot '< tail -7 /Data2.stat' using 1:2 title "Data2" with lp lw 4,
^
"/plot_command.txt", line 2: function to plot expected
Any suggestions?
Upvotes: 2
Views: 5671
Reputation: 674
You shouldn't have a ", \" at the end of the second line of plot_command.txt. The comma indicates that there will be another (third) function, hence the error. Try this instead:
plot '< tail -7 /Data2.stat' using 1:2 title "Data2" with lp lw 4, \
'< tail -7 /Data3.stat' using 1:2 title "alnmindrepl07" with lp lw 4
Upvotes: 1