[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.28 3D (surface) plots
Surface plots are generated using the ‘splot‘ command rather than the ‘plot‘ command. The style ‘with lines‘ draws a surface made from a grid of lines. Solid surfaces can be drawn using the style pm3d. Usually the surface is displayed at some arbitrary viewing angle, such that it clearly represents a 3D surface. 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 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 contour.
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.