4

I have a data file with 4-column data, the first three columns specify a point (x,y,z) and the fourth is either a 1, 2, or 3 - I want the point to be colored based on the value of the fourth column (i.e., if it's a 2, color the point red, if 3, green, if 1, blue)

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
alexvas
  • 695
  • 2
  • 8
  • 23

1 Answers1

5
set style line 1 lc rgb "red"
set style line 2 lc rgb "blue"
set style line 3 lc rgb "green"
splot 'datafile' u 1:2:3:4 lc variable
mgilson
  • 300,191
  • 65
  • 633
  • 696