next up previous contents index
Next: Color box Up: Set-show Previous: Clip   Contents   Index


Cntrparam

set cntrparam controls the generation of contours and their smoothness for a contour plot. show contour displays current settings of cntrparam as well as contour.

Syntax:

     set cntrparam { { linear
                     | cubicspline
                     | bspline
                     | points <n>
                     | order <n>
                     | levels { auto {<n>} | <n>
                                | discrete <z1> {,<z2>{,<z3>...}}
                                | incremental <start>, <incr> {,<end>}
                              }
                     }
                   }
     show contour

This command has two functions. First, it sets the values of z for which contour points are to be determined (by linear interpolation between data points or function isosamples.) Second, it controls the way contours are drawn between the points determined to be of equal z. 5#5n6#6 should be an integral constant expression and 5#5z16#6, 5#5z26#6 ... any constant expressions. The parameters are:

linear, cubicspline, bspline -- Controls type of approximation or interpolation. If linear, then straight line segments connect points of equal z magnitude. If cubicspline, then piecewise-linear contours are interpolated between the same equal z points to form somewhat smoother contours, but which may undulate. If bspline, a guaranteed-smoother curve is drawn, which only approximates the position of the points of equal-z.

points -- Eventually all drawings are done with piecewise-linear strokes. This number controls the number of line segments used to approximate the bspline or cubicspline curve. Number of cubicspline or bspline segments (strokes) = points * number of linear segments.

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 -- Selection of contour levels, controlled by auto (default), discrete, incremental, and 5#5n6#6, number of contour levels.

For auto, 5#5n6#6 specifies a nominal number of levels; the actual number will be adjusted to give simple labels. If the surface is bounded by zmin and zmax, contours will be generated at integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times some power of ten (like the step between two tic marks).

For levels discrete, contours will be generated at z = 5#5z16#6, 5#5z26#6 ... as specified; the number of discrete levels sets the number of contour levels. In discrete mode, any set cntrparam levels 5#5n6#6 are ignored.

For incremental, contours are generated at values of z beginning at 5#5start6#6 and increasing by 5#5increment6#6, until the number of contours is reached. 5#5end6#6 is used to determine the number of contour levels, which will be changed by any subsequent set cntrparam levels 5#5n6#6. If the z axis is logarithmic, 5#5increment6#6 will be interpreted as a factor, just like in set ztics.

If the command set cntrparam is given without any arguments specified, the defaults are used: linear, 5 points, order 4, 5 auto levels.

Examples:

     set cntrparam bspline
     set cntrparam points 7
     set cntrparam order 10

To select levels automatically, 5 if the level increment criteria are met:

     set cntrparam levels auto 5

To specify discrete levels at .1, .37, and .9:

     set cntrparam levels discrete .1,1/exp(1),.9

To specify levels from 0 to 4 with increment 1:

     set cntrparam levels incremental  0,1,4

To set the number of levels to 10 (changing an incremental end or possibly the number of auto levels):

     set cntrparam levels 10

To set the start and increment while retaining the number of levels:

     set cntrparam levels incremental 100,50

See also set contour (p. [*]) for control of where the contours are drawn, and set clabel (p. [*]) for control of the format of the contour labels and linetypes.

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).


next up previous contents index
Next: Color box Up: Set-show Previous: Clip   Contents   Index
Ethan Merritt 2007-03-03