This script has been working fine, and now all of sudden, it is giving
me an error, and
I don't seem to find the reason behind.
My script is :
set terminal jpeg
set nokey
set output "test.jpeg"
set size 1.0, 1.0
set xr [1.e-10:10]
set logscale x 10; set xtics 10
set yr [1e-6:1e-0]
set logscale y 10; set ytics 10
set xl "TIME in seconds"
set yl "ABUNDANCE in Log"
set style line 1 lt 1 lc 1 lw 2 #red
set style line 2 lt 1 lc 2 lw 2 #green
set style line 3 lt 1 lc 3 lw 2 #blue
plot \
"abun_time" every::5 u 4:1 w l ls 1,\
"abun_time" every::5 u 4:2 w l ls 2,\
"abun_time" every::5 u 4:3 w l ls 3
And, I am getting the following error.
gnuplot> plot "abun_time" every::5 u 4:1 w l ls 1,
"abun_time" every::6 u 4:2 w l ls 2,\
^
line 0: invalid character \
gnuplot> "abun_time" every::5 u 4:3 w l ls 3
^
line 0: invalid command
Anyone any idea?
Thank you!
Never mind.
I figured out.
There shouldn't be no blank space after "backslash".
Who would've known..(maybe it's just me.)
> Never mind.
> I figured out.
> There shouldn't be no blank space after "backslash".
> Who would've known..(maybe it's just me.)
Who would've known? He who understood what the backslash was there
for.
The backslash escapes (removes the special meaning of) the following
character. In this case it should be the newline. This means it does
not mean the end of the line, as far as gnuplot is concerned it is one
lone line. If you add a space you get an ignored space and a valid
newline which produces the error you saw. Gnuplot sees a new line and
hence tries to interpret "abun_time" every as a command. The error
makes sense and points you to finding the error.
Though it is difficult to spot the error on the screen until you have
been caught out once, the error is correct and logical. If in doubt
with this sort of problem I backspace the following line until it
joins up then add the backslash and newline afresh.