Syntax:
set cntrparam { { linear | cubicspline | bspline } | points <n> | order <n> | levels { [ auto ] <n> | discrete <z1>,<z2>, ... | incremental {<start>, <incr>{, <end>} } } } show cntrparam
This command controls the way contours are plotted. <n> should be an integral constant expression and <z1>, <z2> any constant expressions. The parameters are:
linear, cubicspline, bspline—Controls type of approximation or interpolation. If linear, then the contours are drawn piecewise linear, as extracted from the surface directly. If cubicspline, then piecewise linear contours are interpolated to form somewhat smoother contours, but which may undulate. If bspline, a guaranteed-smoother curve is drawn, which only approximates the piecewise linear data.
points—Eventually all drawings are done with piecewise linear strokes. This number controls the number of points used to approximate a curve. It is relevant only for cubicspline and bspline modes.
order—Order of the bspline approximation to be used. The bigger this order is, the smoother the resulting contour. (Of course, higher order bspline curves will move further away from the original piecewise linear data.) This option is relevant for bspline mode only. Allowed values are integers in the range from 2 (linear) to 10.
levels—Number of contour levels. Selection of the levels is controlled by auto (default), discrete, and incremental. For auto, if the surface is bounded by zmin and zmax, contours will be generated from zmin+dz to zmax-dz in steps of size dz, where dz = (zmax - zmin) / (levels + 1). For discrete, contours will be generated at z = z1, z2 ... as specified. The number of discrete levels is limited to MAX_DISCRETE_LEVELS, defined in plot.h to be 30. If incremental, contours are generated at values of z beginning at <start> and increasing by <increment> until <end> is reached. If <end> is not specified, MAX_DISCRETE_LEVELS will be generated.
Examples:
set cntrparam bspline set cntrparam points 7 set cntrparam order 10 set cntrparam levels auto 5 # 5 automatic levels set cntrparam levels discrete .1,1/exp(1),.9 # 3 discrete at .1,.37,.9 set cntrparam levels incremental 0,.1,.4 # 5 incremental levels at 0, .1, .2, .3 and .4 set cntrparam levels 10 # sets n = 10 retaining current setting of auto, discr. and # increment's start and increment value, while changing end set cntrparam levels incremental 100,50 # set start = 100 and increment = 50, retaining n levels
See also set contour for control of where the contours are drawn, and set clabel for control of the format of the contour labels.