Credits Overview Plotting Styles Commands Terminals

heatmaps

Several of gnuplot's plot styles can be used to create heat maps. The choice of which style to use is dictated by the type of data.

figure_sparsematrix

The pixel-based image styles require a regular rectangular grid of data values; see with image. However it is possible to deal with some missing grid values (see sparse) and it is also possible to mask out only a portion of the grid for display (see masking). These pixel-based heat maps all have the property that each pixel in the map corresponds exactly to one original data value. Unless there are a large number of grid element, it is usually a good idea to render each rectangular element separately (with image pixels) so that smoothing or lossy compression is not applied to the resulting "image".

figure_mask

If the data points do not constitue a regular rectangular grid, they can often be used to fit a gridded surface by interpolation or by splines. Alternatively a point-density function can be mapped onto a gridded plane or smooth surface. See set dgrid3d. The gridded surface can then be plotted as a pm3d surface (see masking example). In this case the points on the heat map do not retain a one-to-one correspondance with the input data. I.e. the validity of the heat map represenation is only as good as the gridded approximation. The demo collection has examples of generating 2D heatmaps from a set of points heatmap_points.dem

figure_polar_grid

If your copy of gnuplot was built with the --enable-polar-grid option, polar coordinate data points can be used to generate a 2D polar heat map in which each "pixel" corresponded to a pre-determined range of theta and r. See set polar grid and with surface. This process is exactly analogous to the use of set dgrid3d and with pm3d except that it operates in 2D polar coordinate space.