### Color_assignment

3 columns of data (x,y,z):

The coloring setup as well as the color box drawing are determined by set palette. There can be only one palette for the current plot. Drawing of several surfaces with different palettes can be achieved by multiplot with fixed origin and size; don't forget to use set palette maxcolors when your terminal is running out of available colors.

There is a single gray/color value associated to each drawn pm3d quadrangle (it contains a solid color, not a gradient). The value is calculated from z-coordinates the four corners according to corners2color option. 4 columns of data (x,y,z,color):

If a fourth column of data is provided, it is normally interpreted as a separate palette-mapped gray value. The coloring of individual quadrangles works as above, except that the color value is distinct from the z value. As a separate coloring option, the fourth data column may provide instead an RGB color. See rgbcolor variable (p. ). In this case the plotting command must be

         splot ... using 1:2:3:4 with pm3d lc rgb variable

Another drawing algorithm, which would draw quadrangles around a given node by taking corners from averaged (x,y)-coordinates of its surrounding 4 nodes while using node's color, could be implemented in the future. This is already done for drawing images (2D grids) via image and rgbimage styles.

Notice that ranges of z-values and color-values for surfaces are adjustable independently by set zrange, set cbrange, as well as set log for z or cb. Maps can be adjusted by the cb-axis only; see also set view map (p. ) and set colorbox (p. ).