lc rgbcolor variable tells the program to use a 24-bit RGB color from a
separate column in the data file. This requires a corresponding additional
column in the using specifier. The extra column is interpreted as a 24-bit
packed RGB triple. These are most easily specified as hexidecimal values
(see rgbcolor (p.
)). Text colors are similarly set using tc rgbcolor variable.
Example:
# Place colored points in 3D at the x,y,z coordinates corresponding to
# their red, green, and blue components
rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b)
splot "data" using 1:2:3:(rgb($1,$2,$3)) with points lc rgb variable