IDLgrContour

The IDLgrContour object draws a contour plot from data stored in a rectangular array or from a set of unstructured points. Both line contours and filled contour plots can be created.

An IDLgrContour object is an atomic graphic object ; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.

Superclasses

This class has no superclasses.

Subclasses

This class has no subclasses.

Creation

See IDLgrContour::Init

Methods

Intrinsic Methods

This class has the following methods:


IDLgrContour::Cleanup

The IDLgrContour:: Cleanup procedure method performs all cleanup on the object. IDLgrContour is described above.

Calling Sequence

OBJ_DESTROY, Obj

or

Obj -> [IDLgrContour::] Cleanup                               ( In a subclass' Cleanup method only .)

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrContour::GetCTM

The IDLgrContour:: GetCTM function method returns the 4 x 4 graphics transform matrix from the current object upward through the graphics tree. IDLgrContour is described above.

Calling Sequence

Result = Obj -> [IDLgrContour::] GetCTM()

Arguments

There are no arguments for this method.

Keywords

DESTINATION

Set this keyword to the object reference of a destination object to specify that the projection matrix for the View object in the current tree be included in the returned transformation matrix. The resulting matrix will transform a point in the data space of the object on which the GetCTM method is called into a normalized coordinate system (-1 to +1 in X, Y, and Z), relative to the View object that contains the surface object.

TOP

Set this keyword equal to the object reference to an IDLgrModel object to specify that the returned matrix accumulate from the object on which the GetCTM method is called up to and including the specified model object.


IDLgrContour::GetProperty

The IDLgrContour:: GetProperty procedure method retrieves the value of a property or group of properties for the contour. IDLgrContour is described above.

Calling Sequence

Obj -> [IDLgrContour::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrContour::Init

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the retrievable properties associated with this object.

GEOM

Set this keyword to a named variable that will contain the geometry associated with this contour.

PARENT

Set this keyword to a named variable that will contain an object reference to the object that contains this contour.

XRANGE

Set this keyword to a named variable that will contain a two-element vector of the form [ xmin , xmax ] specifying the range of the X data coordinates covered by the contour.

YRANGE

Set this keyword to a named variable that will contain a two-element vector of the form [ ymin , ymax ] specifying the range of the Y data coordinates covered by the contour.

ZRANGE

Set this keyword to a named variable that will contain a two-element vector of the form [ zmin , zmax ] specifying the range of the Z data coordinates covered by the contour.


IDLgrContour::Init

The IDLgrContour:: Init function method initializes the contour object. IDLgrContour is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrContour')

or

Result = Obj -> [IDLgrContour::] Init( [Values] )              ( In a subclass' Init method only .)

Arguments

Values

A vector or two-dimensional array of values to be contoured. If no values are provided, the values will be derived from the GEOMZ keyword value (if set and the PLANAR keyword is not set). In this case, the values to be contoured will match the Z coordinates of the provided geometry.

Keywords

Properties retrievable via IDLgrContour::GetProperty

ANISOTROPY (Get, Set)

Set this keyword equal to a three-element vector [ x , y , z ] that represents the multipliers to be applied to the internally computed correction factors along each axis that account for anisotropic geometry. Correcting for anisotropy is particularly important for the appropriate representations of downhill tickmarks.

By default, IDL will automatically compute correction factors for anisotropy based on the [XYZ] range of the contour geometry. If the geometry (as provided via the GEOMX, GEOMY, and GEOMZ keywords) falls within the range [ xmin , ymin , zmin ] to [ xmax , ymax , zmax ], then the default correction factors are computed as follows:

dx = xmax - xmin

dy = ymax - ymin

dz = zmax - zmin

maxRange = (dx > dy) > dz ; Get the maximum of the ranges.

IF (dx EQ 0) THEN xcorrection = 1.0 ELSE xcorrection = maxRange / dx

IF (dy EQ 0) THEN ycorrection = 1.0 ELSE ycorrection = maxRange / dy

IF (dz EQ 0) THEN zcorrection = 1.0 ELSE zcorrection = maxRange / dz

 

This internally computed correction is then multiplied by the corresponding [ x , y , z ] values of the ANISOTROPY keyword. The default value for this keyword is [1,1,1].

C_COLOR (Get, Set)

Set this keyword to a vector of colors representing the colors to be applied at each contour level. If there are more contour levels than elements in this vector, the colors will be cyclically repeated. If C_COLORS is set to 0, all contour levels will be drawn in the color specified by the COLOR keyword (this is the default).

C_FILL_PATTERN (Get, Set)

Set this keyword to an array of IDLgrPattern objects representing the patterns to be applied at each contour level if the FILL keyword is non-zero. If there are more contour levels than fill patterns, the patterns will be cyclically repeated. If this keyword is set to 0, all contour levels are filled with a solid color (this is the default).

C_LINESTYLE (Get, Set)

Set this keyword to an array of linestyles representing the linestyles to be applied at each contour level. The array may be either a vector of integers representing pre-defined linestyles, or an array of 2-element vectors representing a stippling pattern specification. If there are more contour levels than linestyles, the linestyles will be cyclically repeated. If this keyword is set to 0, all levels are drawn as solid lines (this is the default).

C_THICK (Get, Set)

Set this keyword to an array of line thicknesses representing the thickness to be applied at each contour level. If there are more contour levels than line thicknesses, the thicknesses will be cyclically repeated. If this keyword is set to 0, all contour levels are drawn with a line thickness of 1.0 (this is the default).

 

C_VALUE (Get, Set)

Set this keyword to a vector of values for which contour levels are to be drawn. If this keyword is set to 0, contour levels will be evenly sampled across the range of the DATA_VALUES, using the value of the N_LEVELS keyword to determine the number of samples.

COLOR (Get, Set)

Set this keyword to the color to be used to draw the contours. The color may be specified as a color lookup table index or as an RGB vector. The default is [255,255,255]. This value will be ignored if the C_COLORS keyword is set to a vector.

DATA_VALUES (Get, Set)

Set this keyword to a vector or two-dimensional array specifying the values to be contoured. This keyword is the same as the Values argument described in the Arguments section above.

DOWNHILL (Get, Set)

Set this keyword to indicate that downhill tick marks should be rendered as part of each contour level to indicate the downhill direction relative to the contour line.

FILL (Get, Set)

Set this keyword to indicate that the contours should be filled. The default is to draw the contour levels as lines without filling. Filling contour may produce less than satisfactory results if your data contains NaNs, or if the contours are not closed.

GEOMX (Set)

Set this keyword to a vector or two-dimensional array specifying the X coordinates of the geometry with which the contour values correspond. If X is a vector, it must match the number of elements in the Values argument or DATA_VALUES keyword value, or it must match the first of the two dimensions of the Values argument or DATA_VALUES keyword value (in which case, the X coordinates will be repeated for each row of data values).

GEOMY (Set)

Set this keyword to a vector or two-dimensional array specifying the Y coordinates of the geometry with which the contour values correspond. If Y is a vector, it must match the number of elements in the Values argument or DATA_VALUES keyword value, or it must match the second of the two dimensions of the Values argument or DATA_VALUES keyword value (in which case, the Y coordinates will be repeated for each column of data values).

GEOMZ (Set)

Set this keyword to a scalar, a vector, or a two-dimensional array specifying the Z coordinates of the geometry with which the contour values correspond.

HIDE (Get, Set)

Set this keyword to a boolean value to indicate whether this object should be drawn:

MAX_VALUE (Get, Set)

Set this keyword to the maximum value to be plotted. Data values greater than this value are treated as missing data. The default is the maximum value of the input Z data.

MIN_VALUE (Get, Set)

Set this keyword to the minimum value to be plotted. Data values less than this value are treated as missing data. The default is the minimum value of the input Z data.

NAME (Get, Set)

Set this keyword to a string representing the name to be associated with this object. The default is the null string, ''.

N_LEVELS (Get, Set)

Set this keyword to the number of contour levels to generate. This keyword is ignored if the C_VALUE keyword is set to a vector, in which case, the number of levels is derived from the number of elements in that vector. Set this keyword to zero to indicate that IDL should compute a default number of levels based on the range of data values. This is the default.

PLANAR (Get, Set)

Set this keyword to indicate that the contoured data is to be projected onto a plane. This keyword is ignored if GEOMZ is not a scalar. The default is non-planar (i.e., to display the contoured data at the Z locations provided by the GEOMZ keyword.

POLYGONS (Get, Set)

Set this keyword to an array of polygon descriptions that represents the connectivity information for the data to be contoured (as specified in the Values argument or the DATA_VALUES keyword). A polygon description is an integer or longword array of the form: [ n , i 0 , i 1 , ..., i n-1 ], where n is the number of vertices that define the polygon, and i 0 ..i n -1 are indices into the X , Y , and Z arguments that represent the polygon vertices. To ignore an entry in the POLYGONS array, set the vertex count, n , to 0. To end the drawing list, even if additional array space is available, set n to -1. If this keyword is not specified, a single polygon will be generated.

TICKINTERVAL (Get, Set)

Set this keyword equal to a number indicating the distance between downhill tickmarks, in data units. If TICKINTERVAL is not set, or if you explicitly set it equal to zero, IDL will compute the distance based on the geometry of the contour.

TICKLEN (Get, Set)

Set this keyword equal to a number indicating the length of the downhill tickmarks, in data units. If TICKLEN is not set, or if you explicitly set it equal to zero, IDL will compute the length based on the geometry of the contour.

UVALUE (Get, Set)

Set this keyword to a value of any type. Use this value to contain any information you wish.

XCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert X coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized X = s 0 + s 1 * Data X

Recommended values are:

[(- X min )/( X max - X min ), 1/( X max - X min )]

The default is [0.0, 1.0].

YCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Y coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized Y = s 0 + s 1 * Data Y

Recommended values are:

[(- Y min )/( Y max - Y min ), 1/( Y max - Y min )]

The default is [0.0, 1.0].

ZCOORD_CONV (Get, Set)

Set this keyword to a vector, [ s 0 , s 1 ], of scaling factors used to convert Z coordinates from data units to normalized units. The formula for the conversion is as follows:

Normalized Z = s 0 + s 1 * Data Z

Recommended values are:

[(- Z min )/( Z max - Z min ), 1/( Z max - Z min )]

The default is [0.0, 1.0].


IDLgrContour::SetProperty

The IDLgrContour:: SetProperty procedure method sets the value of a property or group of properties for the contour. IDLgrContour is described above.

Calling Sequence

Obj -> [IDLgrContour::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrContour::Init