Gnuplot 5.2.7

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 or depth-sorted surface elements. See hidden3d and the depthorder option of set pm3d. 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. See set view map. This plot mode can be used to generate contour plots and heat maps. This figure shows contours plotted once with plot style lines, once with style labels.