|
From: Mátyás S. <ser...@gm...> - 2014-03-20 20:40:35
|
Thanks, it solved the problem! 2014-03-20 21:32 GMT+01:00 Thomas Sefzick <t.s...@fz...>: > 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. > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |