|
From: Thomas S. <t.s...@fz...> - 2014-03-20 20:33:34
|
Mátyás Seress <serimatyi <at> gmail.com> writes: > ... > I have a problem with plotting points on the same graph with different > colors specified in a data file. > Here is the script I would like to correct to get it work: > > set terminal jpeg enhanced > set out "data.jpg" > #x=column 3 of datafile > plot "data.dat" using 1:2 linecolor x > set out > > So the x should be the actual color specifying number in the file. The > data.dat looks like this: > > 1.0 2.1 1 > 1.1 2.3 1 > 1.2 2.4 2 > 1.3 2.7 2 > 1.4 3.2 3 > 1.5 3.8 4 > 1.6 4.7 5 > > ... assuming that you want to interpret the 3rd column in the datafile as color information, the syntax for variable colors in one plot is plot "data.dat" using 1:2:3 linecolor variable where the 3rd argument to 'using' specifies the column to read the color information from. |