In a script intended to plot two sets of data points,
the plotting statement is
plot 'plotII.dat' w p pt 7 rgb "blue",\
'plotIII.dat' w p pt 7 rgb "red"
This produces the following error message.
gnuplot> plot 'plotII.dat' w p pt 7 rgb "blue", 'plotIII.dat' w p pt 7
rgb "red"
^
line 0: unexpected or unrecognized token: rgb
But if I remove the second half, from the comma
onwards, it does plot the first set as blue points.
Why is this, and what should I do?
On Tue, 30 Apr 2024 07:12:42 +0200, Jörg Buchholz wrote:
On 29.04.2024 16:50, db wrote:
In a script intended to plot two sets of data points,morning,
the plotting statement is
plot 'plotII.dat' w p pt 7 rgb "blue",\
'plotIII.dat' w p pt 7 rgb "red"
This produces the following error message.
gnuplot> plot 'plotII.dat' w p pt 7 rgb "blue", 'plotIII.dat' w p pt 7
rgb "red"
^
line 0: unexpected or unrecognized token: rgb
But if I remove the second half, from the comma onwards, it does plot
the first set as blue points.
Why is this, and what should I do?
you must put a "lc" for linecolor in front of the rgb.
plot 'plotII.dat' w p pt 7 lc rgb "blue",\
'plotIII.dat' w p pt 7 lc rgb "red"
Jörg
Thank you, that works. I wonder why it works for
just one without the lc.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:28:24 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,582 |