Next: Gamma correction
Up: Palette
Previous: Functions
Contents
Index
File
set palette file is basically a set palette defined (5#5gradient6#6) where
5#5gradient6#6 is read from a datafile. Either 4 columns (gray,R,G,B) or
just three columns (R,G,B) have to be selected via the using data file
modifier. In the three column case, the line number will be used as gray.
The gray range is automatically rescaled to [0,1]. The file is read as a
normal data file, so all datafile modifiers can be used.
Please note, that R might actually be e.g. H if HSV color space is
selected.
As usual 5#5filename6#6 may be '-' which means that the data follow the command
inline and are terminated by a single e on a line of its own.
Use show palette gradient to display the gradient.
Examples:
Read in a palette of RGB triples each in range [0,255]:
set palette file 'some-palette' using ($1/255):($2/255):($3/255)
Equidistant rainbow (blue-green-yellow-red) palette:
set palette model RGB file "-"
0 0 1
0 1 0
1 1 0
1 0 0
e
Binary palette files are supported as well, see binary general (p. ). Example:
put 64 triplets of R,G,B doubles into file palette.bin and load it by
set palette file "palette.bin" binary record=64 using 1:2:3
Next: Gamma correction
Up: Palette
Previous: Functions
Contents
Index
Ethan Merritt
2007-03-03