3D plots
3D plots are generated using the command splot rather than plot. Many of the 2D plot styles (points, images, impulse, labels, vectors) can also be used in 3D by providing an extra column of data containing z coordinate. Some plot types (pm3d coloring, surfaces, contours) must be generated using the splot command even if only a 2D projection is wanted.Surface plots
The styles splot with lines and splot with surface both generate a surface made from a grid of lines. Solid surfaces can be generated using the style splot with pm3d. Usually the surface is displayed at some convenient viewing angle, such that it clearly represents a 3D surface. See set view. In this case the X, Y, and Z axes are all visible in the plot. The illusion of 3D is enhanced by choosing hidden line removal. See hidden3d. The splot command can also calculate and draw contour lines corresponding to constant Z values. These contour lines may be drawn onto the surface itself, or projected onto the XY plane. See set contour.2D projection (set view map)
An important special case of the splot command is to map the Z coordinate onto a 2D surface by projecting the plot along the Z axis onto the xy plane. See set view map. This plot mode is useful for contour plots and heat maps. This figure shows contours plotted once with plot style lines and once with style labels.PM3D plots
3D surfaces can also be drawn using solid pm3d quadrangles rather than lines. In this case there is no hidden surface removal, but if the component facets are drawn back-to-front then a similar effect is achieved. See set pm3d depthorder. While pm3d surfaces are by default colored using a smooth color palette (see set palette), it is also possible to specify a solid color surface or to specify distinct solid colors for the top and bottom surfaces as in the figure shown here. See pm3d fillcolor. Unlike the line-trimming in hidden3d mode, pm3d surfaces can be smoothly clipped to the current zrange. See set pm3d clipping.
Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Distributed under the gnuplot license (rights to distribute modified versions are withheld).