Credits Overview Plotting Styles Commands Terminals

show palette palette

      show palette palette {<ncolors>} {{float | int | hex}}

show palette palette <n> prints to the screen or to the file given by set print a table of color components for each entry in the current palette. By default the continuous palette is sampled in 128 increments. Specifying <ncolors> will sample the palette evenly at this number of increments (rather than 128). The default is a long listing in the form

     0. gray=0.0000, (r,g,b)=(0.0000,0.0000,0.0000), #000000 =   0   0   0
     1. gray=0.1111, (r,g,b)=(0.3333,0.0014,0.6428), #5500a4 =  85   0 164
     2. gray=0.2222, (r,g,b)=(0.4714,0.0110,0.9848), #7803fb = 120   3 251
     ...

An optional trailing keyword float, int, or hex instead prints only single representation of the color components per entry:

        int:        85       0     164
      float:    0.3333  0.0014  0.6428
        hex:  0x5500a4

By using set print to direct this output to a file, the current gnuplot color palette can be loaded into other imaging applications such as Octave.

By using set print to direct output to a datablock, the current palette can be saved so that it is available to future plot commands even if the active palette is redefined. This allows creating plots that draw from multiple palettes, although the colorbox still represents only the current active palette.