Color look-up-table (LUT)
Color look-up-tables are stored in extra files.
These files contain the LUT-entrys line by line.
Each entry defines a linear color transition from one
shade to another.
Syntax of LUT-entry:
value_1 red_1,green_1,blue_1 value_2 red_2,green_2,blue_2 steps
A shade is defined for all values between 'value_1' and 'value_2'.
'steps' indicates how many different shades are used.
The (red, green, blue) values are floating point numbers
between 0.0 and 1.0.
Zero means the lowest intensity and one is the highest.
Loading:
A look-up-table is loaded using the pixmax-command
set lut color.lut
This will search the file color.lut in the current working directory.
If present, the file is read line by line and the LUT-entries are
processed.
Examples:
+
|
Colorbar
|
LUT-file
|
1.)
|
|
-2.0 1.0,0.0,0.0 2.0 1.0,1.0,0.0 2
|
2.)
|
|
-2.0 1.0,0.0,0.0 2.0 1.0,1.0,0.0 3
|
3.)
|
|
-2.0 1.0,0.0,0.0 2.0 1.0,1.0,0.0 40
|
4.)
|
|
-2.0 1.0,0.0,0.0 2.0 1.0,1.0,0.0 40
-0.75 0.0,0.0,1.0 1.5 0.0,0.0,0.0 10
|
5.)
|
|
0.0 1.0,0.0,0.0 0.5 1.0,1.0,0.0 10
0.5 1.0,1.0,0.0 1.0 1.0,0.0,0.0 10
|
Notes:
-
Already by one line (resp. entry) a nice color table can be generated
(see example 3).
-
If the value-range of two entries is overlapping, the second entry
is dominating in the overlap-region (see example 4).
-
To obtain the colorbar in example 5, a periodic LUT has to be
enabled (using the pixmax-command 'set periodic_lut yes').
-
The maximum number of LUT-entries is 256 (this means 256 transitions
with an unlimited number of different colors).
This maximum number can be changed using a command line option or
by a setting in the init-file.
Commands to plot the colorbars shown above:
back 63,63,63
set line_w 1
set lut color.lut
set font 9x15bold
set text_bg 63,63,63
set periodic_lut yes
set line_c 255,255,255
set cb_pos 20,20
set cb_size 320,40
set cb_skip 20,25
set cb_ticks 5
draw color -2,2
back