Credits | Overview | Plotting Styles | Commands | Terminals
--- | --- | --- | --- | ---

## color box

For plots that use palette coloring, in particular pm3d plots, the palette gradient is drawn in a color box next to the plot unless it is switched off by unset colorbox.

          set colorbox
          set colorbox {
                     { vertical | horizontal } {{no}invert}
                     { default | bottom | user }
                     { origin x, y }
                     { size x, y }
                     { front | back }
                     { noborder | bdefault | border [line style] }
                   }
          show colorbox
          unset colorbox

The orientation of the color gradient is set by vertical or horizontal.

The color box position can be default or bottom or user. The bottom keyword is a convenience short cut equivalent to

         set colorbox horizontal user origin screen 0.1, 0.07 size 0.8, 0.03.

If the colorbox is placed underneath the plot, as it is with bottom, it may be useful to reserve additional space for it: set bmargin screen 0.2.

origin x, y and size x, y are used to tailor the exact placement in user or bottom positioning. The x and y values are interpreted as screen coordinates by default, and this is the only legal option for 3D plots. 2D plots, including splot with set view map, allow any coordinate system.

back/front control whether the color box is draw before or after the plot.

border turns the border on (this is the default). noborder turns the border off. If an positive integer argument is given after border, it is used as a line style tag which is used for drawing the border, e.g.:

        set style line 2604 linetype -1 linewidth .4
        set colorbox border 2604

will use line style 2604, a thin line with the default border color (-1) for drawing the border. bdefault (which is the default) will use the default border line style for drawing the border of the color box.

The axis of the color box is called cb and it is controlled by means of the usual axes commands, i.e. set/unset/show with cbrange, [m]cbtics, format cb, grid [m]cb, cblabel, and perhaps even cbdata, [no]cbdtics, [no]cbmtics.

set colorbox without any parameter switches the position to default. unset colorbox resets the default parameters for the colorbox and switches the colorbox off.

See also help for set pm3d, set palette, and set style line.