Syntax:
set contour {base | surface | both} unset contour show contour
The three options specify where to draw the contours: base draws the contours on the grid base where the x/ytics are placed, surface draws the contours on the surfaces themselves, and both draws the contours on both the base and the surface. If no option is provided, the default is base.
See also set cntrparam (p. ) for the parameters that affect the drawing of contours, and set clabel (p. ) for control of labelling of the contours.
The surface can be switched off (see set surface (p. )), giving a contour-only graph. Though it is possible to use set size to enlarge the plot to fill the screen, more control over the output format can be obtained by writing the contour information to a file, and rereading it as a 2-d datafile plot:
unset surface set contour set cntrparam ... set table 'filename' splot ... unset table # contour info now in filename set term <whatever> plot 'filename'
In order to draw contours, the data should be organized as "grid data". In such a file all the points for a single y-isoline are listed, then all the points for the next y-isoline, and so on. A single blank line (a line containing no characters other than blank spaces and a carriage return and/or a line feed) separates one y-isoline from the next. See also splot datafile (p. ).
See also
http://www.gnuplot.info/demo/contours.htmlcontours demo (contours.dem)
and
http://www.gnuplot.info/demo/discrete.htmlcontours with user defined levels demo (discrete.dem).