2
votes

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?

1
Should be 'load 'path/to/plot_command.txt' . Did you miss a tick mark? - Mikhail
No, I have the tic around the file path, just a typo - Shuvo Shams

1 Answers

1
votes

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