How to choose a color for each point in the Gnuplot data file?

I want to draw dots, each with X, Y and color. How to do it in Gnuplot?

+5
source share
2 answers

You can try something like this:

A line in GnuPlot, where is the line color the third column in my data file?

For instance:

plot "./file.dat" u 1:2:3 with points palette

where file.dat contains your data, the first column is the x axis, and the second column is the y axis, and the third is color.

+8
source

You might consider creating a Pyxplot layout package http://pyxplot.org.uk , which has very similar syntax for gnuplot (although it is very clean), and which allows you to specify point styles for each point. For example, in Pyxplot:

plot "file.dat" using 1:2:3 with points color rgb($4,$5,$6)

RGB 4-, 5- 6- . ,

plot "file.dat" using 1:2:3 with points color $4

4- ( n) n- . n , , 2.5, 2 3 RGB.

+3

All Articles