ContourPlot class
The ContourPlot class draws line or filled contours with labels and annotations.Synopsis
Header file: ncarg/hlu/ContourPlot.h Class name: contourPlotClass Class pointer: NhlcontourPlotClass Fortran class function: NHLFCONTOURPLOTCLASS Superclass: DataComm Composite classes: LogLinTransformation, IrregularTransformation, CurvilinearTransformation, SphericalTransformation, TriangularMeshTransformation, PlotManager Data specific class Class name: contourPlotDataDepClass Class pointer: NhlcontourPlotDataDepClass Fortran class function: NHLFCONTOURPLOTDATADEPCLASS Superclass: DataSpec
Class-defined types
Type name: NhlTcnLevelUseMode Definition: typedef enum _NhlcnLevelUseMode { NhlNOLINE = 0, /* "NoLine" */ NhlLINEONLY = 1, /* "LineOnly" */ NhlLABELONLY = 2, /* "LabelOnly" */ NhlLINEANDLABEL = 3 /* "LineAndLabel" */ } NhlcnLevelUseMode; Type name: NhlTcnLevelUseModeGenArray Definition: An array of NhlTcnLevelUseMode elements. Type name: NhlTcnLineLabelPlacementMode Definition: typedef enum _NhlcnLineLabelSpacingMode { NhlCONSTANT = 0, /* "Constant" */ NhlRANDOMIZED = 1, /* "Randomized" */ NhlCOMPUTED = 2 /* "Computed" */ } NhlcnLineLabelSpacingMode; Type name: NhlTcnHighLowLabelOverlapMode Definition: typedef enum _NhlcnHighLowLabelOverlapMode { NhlIGNOREOVERLAP = 0,1 /* "IgnoreOverlap" */ NhlOMITOVERHL = 2,3 /* "OmitOverHL" */ NhlOMITOVERVP = 4,5 /* "OmitOverVP" */ NhlOMITOVERVPANDHL = 6,7 /* "OmitOverVPAndHL" */ NhlADJUSTVP = 8,9 /* "AdjustVP" */ NhlADJUSTVPOMITOVERHL = 10,11 /* "AdjustVPOmitOverHL" */ } NhlcnHighLowLabelOverlapMode; Type name: NhlTcnFillMode Definition: typedef enum _NhlcnFillMode { NhlAREAFILL = 0, /* "AreaFill" */ NhlRASTERFILL = 1, /* "RasterFill" */ NhlCELLFILL = 2 /* "CellFill" */ } NhlcnFillMode;
Resources
Local resources
+---------------------------------------------------------------+ | ContourPlot Resource Set | |---------------------------------------------------------------| | NAME TYPE ACCESS | | CLASS DEFAULT | |===============================================================| | cnScalarFieldData NhlTInteger RCSG | | CnScalarFieldData <None> | |---------------------------------------------------------------| | cnLevelSelectionMode NhlTLevelSelectionMode RCSG | | LevelSelectionMode "AutomaticLevels" | |---------------------------------------------------------------| | cnLevelCount NhlTInteger G | | CnLevelCount <dynamic> | |---------------------------------------------------------------| | cnMaxLevelCount NhlTInteger RCSG | | MaxLevelCount 16 | |---------------------------------------------------------------| | cnLevelSpacingF NhlTFloat RCSG | | LevelSpacingF 5.0 | |---------------------------------------------------------------| | cnMinLevelValF NhlTFloat RCSG | | MinLevelValF <dynamic> | |---------------------------------------------------------------| | cnMaxLevelValF NhlTFloat RCSG | | MaxLevelValF <dynamic> | |---------------------------------------------------------------| | cnLevels NhlTFloatGenArray RCSG | | Levels <dynamic> | |---------------------------------------------------------------| | cnMonoLevelFlag NhlTBoolean RCSG | | CnMonoLevelFlag False | |---------------------------------------------------------------| | cnLevelFlag NhlTcnLevelUseMode RCSG | | CnLevelFlags "LineOnly" | |---------------------------------------------------------------| | cnLevelFlags NhlTcnLevelUseModeGenArray RCSG | | CnLevelFlags <dynamic> | |---------------------------------------------------------------| | cnLinesOn NhlTBoolean RCSG | | CnLinesOn True | |---------------------------------------------------------------| | cnLineDrawOrder NhlTDrawOrder RCSG | | CnLineDrawOrder "Draw" | |---------------------------------------------------------------| | cnMonoLineColor NhlTBoolean RCSG | | CnMonoLineColor True | |---------------------------------------------------------------| | cnLineColor NhlTColorIndex RCSG | | LineColor "Foreground" | |---------------------------------------------------------------| | cnSpanLinePalette NhlTBoolean RCSG | | CnSpanLinePalette True | |---------------------------------------------------------------| | cnLinePalette NhlTColorDefinitionGenArray RCSG | | CnLinePalette <None> | |---------------------------------------------------------------| | cnLineColors NhlTColorIndexGenArray RCSG | | CnLineColors <dynamic> | |---------------------------------------------------------------| | cnMonoLineDashPattern NhlTBoolean RCSG | | CnMonoLineDashPattern True | |---------------------------------------------------------------| | cnLineDashPattern NhlTDashIndex RCSG | | LineDashPattern "SolidLine" | |---------------------------------------------------------------| | cnLineDashPatterns NhlTDashIndexGenArray RCSG | | CnLineDashPatterns <dynamic> | |---------------------------------------------------------------| | cnMonoLineThickness NhlTBoolean RCSG | | CnMonoLineThickness True | |---------------------------------------------------------------| | cnLineThicknessF NhlTFloat RCSG | | LineThicknessF 1.0 | |---------------------------------------------------------------| | cnLineThicknesses NhlTFloatGenArray RCSG | | CnLineThicknesses 1.0 for all elements | |---------------------------------------------------------------| | cnLineDashSegLenF NhlTFloat RCSG | | LineDashSegLenF 0.15 | |---------------------------------------------------------------| | cnFillOn NhlTBoolean RCSG | | CnFillOn False | |---------------------------------------------------------------| | cnFillMode NhlTcnFillMode RCSG | | CnFillMode False | |---------------------------------------------------------------| | cnFillDrawOrder NhlTDrawOrder RCSG | | CnFillDrawOrder "Draw" | |---------------------------------------------------------------| | cnFillBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Transparent" | |---------------------------------------------------------------| | cnMonoFillColor NhlTBoolean RCSG | | CnMonoFillColor False | |---------------------------------------------------------------| | cnFillColor NhlTColorIndex RCSG | | FillColor "Foreground" | |---------------------------------------------------------------| | cnSpanFillColor NhlTBoolean RCSG | | CnSpanFillColor True | |---------------------------------------------------------------| | cnFillPalette NhlTColorDefinitionGenArray RCSG | | CnFillPalette <None> | |---------------------------------------------------------------| | cnFillColors NhlTColorIndexGenArray RCSG | | CnFillColors <dynamic> | |---------------------------------------------------------------| | cnMonoFillPattern NhlTBoolean RCSG | | CnMonoFillPattern True | |---------------------------------------------------------------| | cnFillPattern NhlTFillIndex RCSG | | FillPattern "SolidFill" | |---------------------------------------------------------------| | cnFillPatterns NhlTFillIndexGenArray RCSG | | CnFillPatterns <dynamic> | |---------------------------------------------------------------| | cnFillDotSizeF NhlTFloat RCSG | | DotSizeF 0.0 | |---------------------------------------------------------------| | cnMonoFillScale NhlTBoolean RCSG | | CnMonoFillScale True | |---------------------------------------------------------------| | cnFillScaleF NhlTFloat RCSG | | FillScaleF 1.0 | |---------------------------------------------------------------| | cnFillScales NhlTFloatGenArray RCSG | | CnFillScales 1.0 for all elements | |---------------------------------------------------------------| | cnCellFillEdgeColor NhlTColorIndex RCSG | | EdgeColor "Transparent" | |---------------------------------------------------------------| | cnCellFillMissingValEdgeColor NhlTColorIndex RCSG | | EdgeColor "Transparent" | |---------------------------------------------------------------| | cnRasterModeOn NhlTBoolean RCSG | | CnRasterModeOn False | |---------------------------------------------------------------| | cnRasterSmoothingOn NhlTBoolean RCSG | | CnRasterSmoothingOn False | |---------------------------------------------------------------| | cnRasterMinCellSizeF NhlTFloat RCSG | | CnRasterMinCellSizeF 0.001 | |---------------------------------------------------------------| | cnRasterSampleFactorF NhlTFloat RCSG | | CnRasterSampleFactorF False | |---------------------------------------------------------------| | cnRasterCellSizeF NhlTFloat RCSG | | CnRasterCellSizeF <dynamic> | |---------------------------------------------------------------| | cnLabelDrawOrder NhlTDrawOrder RCSG | | CnLabelDrawOrder "Draw" | |---------------------------------------------------------------| | cnLabelMasking NhlTBoolean RCSG | | CnLabelMasking False | |---------------------------------------------------------------| | cnLowUseHighLabelRes NhlTBoolean RCSG | | CnLowUseHighLabelRes False | |---------------------------------------------------------------| | cnHighUseLineLabelRes NhlTBoolean RCSG | | CnHighUseLineLabelRes False | |---------------------------------------------------------------| | cnConstFUseInfoLabelRes NhlTBoolean RCSG | | CnConstFUseInfoLabelRes False | |---------------------------------------------------------------| | cnHighLowLabelOverlapMode NhlTcnHighLowLabelOverlapMode RCSG | | CnHighLowLabelOverlapMode "IgnoreOverlap" | |---------------------------------------------------------------| | cnLabelScalingMode NhlTScalingMode RCSG | | CnLabelScalingMode "ScaleFactor" | |---------------------------------------------------------------| | cnLabelScaleValueF NhlTFloat RCSG | | CnLabelScaleValueF 1.0 | |---------------------------------------------------------------| | cnLabelScaleFactorF NhlTFloat G | | CnLabelScaleFactorF <dynamic> | |---------------------------------------------------------------| | cnMaxDataValueFormat NhlTString RCSG | | CnMaxDataValueFormat NULL | |---------------------------------------------------------------| | cnLineLabelsOn NhlTBoolean RCSG | | PlotLabelsOn True | |---------------------------------------------------------------| | cnExplicitLineLabelsOn NhlTBoolean RCSG | | CnExplicitLineLabelsOn False | |---------------------------------------------------------------| | cnLineLabelPlacementMode NhlTcnLineLabelPlacementMode RCSG | | CnLineLabelPlacementMode "Randomized" | |---------------------------------------------------------------| | cnLineLabelDensityF NhlTFloat RCSG | | CnLineLabelDensityF 0.0 | |---------------------------------------------------------------| | cnLineLabelInterval NhlTFloat RCSG | | CnLineLabelInterval 2 | |---------------------------------------------------------------| | cnLineLabelCount NhlTInteger G | | CnLineLabelCount 0 | |---------------------------------------------------------------| | cnLineLabelStrings NhlTStringGenArray RCSG | | CnLineLabelStrings <dynamic> | |---------------------------------------------------------------| | cnMonoLineLabelFontColor NhlTBoolean RCSG | | CnMonoLineLabelFontColor True | |---------------------------------------------------------------| | cnLineLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | cnLineLabelFontColors NhlTColorIndexGenArray RCSG | | CnLineLabelFontColors <dynamic> | |---------------------------------------------------------------| | cnLineLabelFormat NhlTString RCSG | | NumberFormat "*+g" | |---------------------------------------------------------------| | cnLineLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | cnLineLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | cnLineLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | cnLineLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | cnLineLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | cnLineLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | cnLineLabelAngleF NhlTFloat RCSG | | CnLineLabelAngleF -1.0 | |---------------------------------------------------------------| | cnLineLabelFuncCode NhlTCharacter RCSG | | TextFuncCode ':' | |---------------------------------------------------------------| | cnLineLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | cnLineLabelPerimOn NhlTInteger RCSG | | EdgesOn True | |---------------------------------------------------------------| | cnLineLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | cnLineLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnLineLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnHighLabelsOn NhlTBoolean RCSG | | PlotLabelsOn False | |---------------------------------------------------------------| | cnHighLabelCount NhlTInteger G | | CnHighLabelCount 0 | |---------------------------------------------------------------| | cnHighLabelString NhlTString RCSG | | CnHighLabelString NULL | |---------------------------------------------------------------| | cnHighLabelFormat NhlTString RCSG | | NumberFormat "*+g" | |---------------------------------------------------------------| | cnHighLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | cnHighLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | cnHighLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | cnHighLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | cnHighLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | cnHighLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | cnHighLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | cnHighLabelAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | cnHighLabelFuncCode NhlTCharacter RCSG | | TextFuncCode ':' | |---------------------------------------------------------------| | cnHighLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | cnHighLabelPerimOn NhlTInteger RCSG | | EdgesOn True | |---------------------------------------------------------------| | cnHighLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | cnHighLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnHighLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnLowLabelsOn NhlTBoolean RCSG | | PlotLabelsOn False | |---------------------------------------------------------------| | cnLowLabelCount NhlTInteger G | | CnLowLabelCount 0 | |---------------------------------------------------------------| | cnLowLabelString NhlTString RCSG | | CnLowLabelString NULL | |---------------------------------------------------------------| | cnLowLabelFormat NhlTString RCSG | | NumberFormat "*+g" | |---------------------------------------------------------------| | cnLowLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | cnLowLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | cnLowLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | cnLowLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | cnLowLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | cnLowLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | cnLowLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | cnLowLabelAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | cnLowLabelFuncCode NhlTCharacter RCSG | | TextFuncCode ':' | |---------------------------------------------------------------| | cnLowLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | cnLowLabelPerimOn NhlTInteger RCSG | | EdgesOn True | |---------------------------------------------------------------| | cnLowLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | cnLowLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnLowLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnInfoLabelOn NhlTBoolean RCSG | | AnnotationLabelsOn True | |---------------------------------------------------------------| | cnInfoLabelString NhlTString RCSG | | CnInfoLabelString NULL | |---------------------------------------------------------------| | cnInfoLabelFormat NhlTString RCSG | | NumberFormat "*+g" | |---------------------------------------------------------------| | cnInfoLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | cnInfoLabelTextDirection NhlTTextDirection RCSG | | TextDirection "Across" | |---------------------------------------------------------------| | cnInfoLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | cnInfoLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | cnInfoLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | cnInfoLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | cnInfoLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | cnInfoLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | cnInfoLabelAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | cnInfoLabelFuncCode NhlTCharacter RCSG | | TextFuncCode ':' | |---------------------------------------------------------------| | cnInfoLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | cnInfoLabelPerimOn NhlTInteger RCSG | | EdgesOn True | |---------------------------------------------------------------| | cnInfoLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | cnInfoLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnInfoLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnInfoLabelZone NhlTInteger RCSG | | CnInfoLabelZone 3 | |---------------------------------------------------------------| | cnInfoLabelSide NhlTPosition RCSG | | CnInfoLabelSide "Bottom" | |---------------------------------------------------------------| | cnInfoLabelJust NhlTJustification RCSG | | CnInfoLabelJust "TopRight" | |---------------------------------------------------------------| | cnInfoLabelParallelPosF NhlTFloat RCSG | | CnInfoLabelParallelPosF 1.0 | |---------------------------------------------------------------| | cnInfoLabelOrthogonalPosF NhlTFloat RCSG | | CnInfoLabelOrthogonalPosF 0.02 | |---------------------------------------------------------------| | cnNoDataLabelOn NhlTBoolean RCSG | | AnnotationLabelsOn True | |---------------------------------------------------------------| | cnNoDataLabelString NhlTString RCSG | | CnNoDataLabelString NULL | |---------------------------------------------------------------| | cnConstFLabelOn NhlTBoolean RCSG | | AnnotationLabelsOn True | |---------------------------------------------------------------| | cnConstFLabelString NhlTString RCSG | | CnConstFLabelString NULL | |---------------------------------------------------------------| | cnConstFLabelFormat NhlTString RCSG | | NumberFormat "*+g" | |---------------------------------------------------------------| | cnConstFLabelFontHeightF NhlTFloat RCSG | | FontHeightF <dynamic> | |---------------------------------------------------------------| | cnConstFLabelTextDirection NhlTTextDirection RCSG | | TextDirection "Across" | |---------------------------------------------------------------| | cnConstFLabelFont NhlTFont RCSG | | Font "pwritx" | |---------------------------------------------------------------| | cnConstFLabelFontColor NhlTColorIndex RCSG | | FontColor "Foreground" | |---------------------------------------------------------------| | cnConstFLabelFontAspectF NhlTFloat RCSG | | FontAspectF 1.3125 | |---------------------------------------------------------------| | cnConstFLabelFontThicknessF NhlTFloat RCSG | | FontThicknessF 1.0 | |---------------------------------------------------------------| | cnConstFLabelFontQuality NhlTFontQuality RCSG | | FontQuality "High" | |---------------------------------------------------------------| | cnConstFLabelConstantSpacingF NhlTFloat RCSG | | TextConstantSpacingF 0.0 | |---------------------------------------------------------------| | cnConstFLabelAngleF NhlTFloat RCSG | | TextAngleF 0.0 | |---------------------------------------------------------------| | cnConstFLabelFuncCode NhlTCharacter RCSG | | TextFuncCode ':' | |---------------------------------------------------------------| | cnConstFLabelBackgroundColor NhlTColorIndex RCSG | | FillBackgroundColor "Background" | |---------------------------------------------------------------| | cnConstFLabelPerimOn NhlTInteger RCSG | | EdgesOn True | |---------------------------------------------------------------| | cnConstFLabelPerimSpaceF NhlTFloat RCSG | | EdgeBorderWidthF 0.33 | |---------------------------------------------------------------| | cnConstFLabelPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnConstFLabelPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnConstFLabelZone NhlTInteger RCSG | | CnConstFLabelZone 0 | |---------------------------------------------------------------| | cnConstFLabelSide NhlTPosition RCSG | | CnConstFLabelSide "Bottom" | |---------------------------------------------------------------| | cnConstFLabelJust NhlTJustification RCSG | | CnConstFLabelJust "CenterCenter" | |---------------------------------------------------------------| | cnConstFLabelParallelPosF NhlTFloat RCSG | | CnConstFLabelParallelPosF 0.0 | |---------------------------------------------------------------| | cnConstFLabelOrthogonalPosF NhlTFloat RCSG | | CnConstFLabelOrthogonalPosF 0.0 | |---------------------------------------------------------------| | cnMissingValPerimOn NhlTBoolean RCSG | | EdgesOn False | |---------------------------------------------------------------| | cnMissingValPerimGridBoundOn NhlTBoolean RCSG | | CnMissingValPerimGridBoundOn False | |---------------------------------------------------------------| | cnMissingValPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnMissingValPerimDashPattern NhlTDashIndex RCSG | | EdgeDashPattern "SolidLine" | |---------------------------------------------------------------| | cnMissingValPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnMissingValFillColor NhlTColorIndex RCSG | | FillColor "Background" | |---------------------------------------------------------------| | cnMissingValFillPattern NhlTInteger RCSG | | FillPattern "HollowFill" | |---------------------------------------------------------------| | cnMissingValFillScaleF NhlTFloat RCSG | | FillScaleF 1.0 | |---------------------------------------------------------------| | cnGridBoundPerimOn NhlTInteger RCSG | | EdgesOn False | |---------------------------------------------------------------| | cnGridBoundPerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnGridBoundPerimDashPattern NhlTDashIndex RCSG | | EdgeDashPattern "SolidLine" | |---------------------------------------------------------------| | cnGridBoundPerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnOutOfRangePerimOn NhlTInteger RCSG | | EdgesOn False | |---------------------------------------------------------------| | cnOutOfRangePerimThicknessF NhlTFloat RCSG | | EdgeThicknessF 1.0 | |---------------------------------------------------------------| | cnOutOfRangePerimDashPattern NhlTDashIndex RCSG | | EdgeDashPattern "SolidLine" | |---------------------------------------------------------------| | cnOutOfRangePerimColor NhlTColorIndex RCSG | | EdgeColor "Foreground" | |---------------------------------------------------------------| | cnSmoothingOn NhlTBoolean RCSG | | CnSmoothingOn False | |---------------------------------------------------------------| | cnSmoothingTensionF NhlTFloat RCSG | | CnSmoothingTensionF -2.5 | |---------------------------------------------------------------| | cnSmoothingDistanceF NhlTFloat RCSG | | CnSmoothingDistanceF 0.01 | |---------------------------------------------------------------| | cnMaxPointDistanceF NhlTFloat RCSG | | CnMaxPointDistanceF 0.05 | |---------------------------------------------------------------| | cnExplicitLabelBarLabelsOn NhlTBoolean RCSG | | CnExplicitLabelBarLabelsOn False | |---------------------------------------------------------------| | cnLabelBarEndLabelsOn NhlTBoolean RCSG | | CnLabelBarEndLabelsOn False | |---------------------------------------------------------------| | cnLabelBarEndStyle NhlTLabelBarEndStyle RCSG | | CnLabelBarEndStyle "IncludeOuterBoxes" | |---------------------------------------------------------------| | cnExplicitLegendLabelsOn NhlTBoolean RCSG | | CnExplicitLegendLabelsOn False | |---------------------------------------------------------------| | cnLegendLevelFlags NhlTcnLevelUseModeGenArray RCSG | | CnLegendLevelFlags NULL | |---------------------------------------------------------------| | cnConpackParams NhlTStringGenArray RCS | | CnConpackParams NULL | |---------------------------------------------------------------| | cnFixFillBleed NhlTBoolean RCS | | CnFixFillBleed NULL | +---------------------------------------------------------------+
Data specific resources
The ContourPlot class does not currently use any data specific resources.
Composite resources
Transformation resources
Transformation class resources specify the extent, direction and grid type of the data coordinate system. The Transformation class is the superclass of all classes used to perform data transformations, and you can access all its resources. However, note that ContourPlot intercepts its resources, as follows:-
- trXMinF
- By default trXMinF is set to the minimum data coordinate value along the X Axis, as determined from the contents of the ScalarField object.
-
- trXMaxF
- By default trXMaxF is set to the maximum data coordinate value along the X Axis, as determined from the contents of the ScalarField object.
-
- trXReverse
- By default trXReverse is set based on the direction of the X Axis implied by the contents of the ScalarField object.
-
- trYMinF
- By default trYMinF is set to the minimum data coordinate value along the Y Axis, as determined from the contents of the ScalarField object.
-
- trYMaxF
- By default trYMaxF is set to the maximum data coordinate value along the Y Axis, as determined from the contents of the ScalarField object.
-
- trYReverse
- By default trYReverse is set based on the direction of the Y Axis implied by the contents of the ScalarField object.
-
- trGridType
- If trGridType is set to
TriangularMesh
ContourPlot does not alter the set value. If cnScalarFieldData is set using a MeshScalarField object, trGridType is forced toTriangularMesh
. Otherwise, If cnScalarFieldData is set using a regular ScalarField object, trGridType is forced toLogLin
if sfXArray and sfYArray both haveNULL
values. It is forced toIrregular
if sfXArray and/or sfYArray contain 1D coordinate arrays. If sfXArray and sfYArray contain 2D coordinate arrays, trGridType defaults toSpherical
but it can optionally be set toCurvilinear
orTriangularMesh
.
LogLinTransformation resources
The ContourPlot class uses the LogLinTransformation to handle its transformations as long as neither of the ScalarField array resources, sfXArray or sfYArray, is set. LogLinTransformation has resources for selecting between linear and logarithmic coordinates for each axis.You can access all LogLinTransformation resources. However, note that ContourPlot intercepts LogLinTransformation resources, as follows:
-
- trXLog
- ContourPlot issues a warning if trXLog
is set True when the set value of trXMinF is less than or
equal to 0.0. In this case it resets trXLog to False. If the
IrregularTransformation resource trXAxisType
is set, ContourPlot sets trXLog True if
trXAxisType is set to
LogAxis
. If trXAxisType is set to any other value, it sets trXLog False.
-
- trYLog
- ContourPlot issues a warning if trYLog
is set True when the set value of trYMinF is less than or
equal to 0.0. In this case it resets trYLog to False. If the
IrregularTransformation resource trYAxisType
is set, ContourPlot sets trYLog True if
trYAxisType is set to
LogAxis
. If trYAxisType is set to any other value, it sets trYLog False.
IrregularTransformation resources
ContourPlot automatically uses the IrregularTransformation to handle its transformations if the ScalarField array resources sfXArray and/or sfYArray are set with one-dimensional arrays, implying that one or both of the coordinate axes is irregularly spaced.All Transformation superclass resources are accessible. However, ContourPlot blocks access to all resources specific to the IrregularTransformation except for:
and for the following intercepted resources:-
- trXAxisType
- If the ScalarField resource sfXArray is
non-
NULL
and trXAxisType is set to any value other thanIrregularAxis
, ContourPlot switches to a coordinate extent bounded by 0 and the length of the X-Axis dimension minus one. If trXAxisType is not set, but the LogLinTransformation resource trXLog is set, ContourPlot sets trXAxisType toLogAxis
if trXLog is True; if trXLog is False, it changes trXAxisType toLinearAxis
if it had been set toLogAxis
and leaves it unchanged otherwise. trXAxisType can be set toLogAxis
without error only when the X-Axis coordinate extent as passed from the ScalarField is entirely positive. If this is not the case, trXAxisType will default toLinearAxis
.
-
- trYAxisType
- If the ScalarField resource sfYArray is
non-
NULL
and trYAxisType is set to any value other thanIrregularAxis
, ContourPlot switches to a coordinate extent bounded by 0 and the length of the Y-Axis dimension minus one. If trYAxisType is not set, but the LogLinTransformation resource trYLog is set, ContourPlot sets trYAxisType toLogAxis
if trYLog is True; if trYLog is False, it changes trYAxisType toLinearAxis
if it had been set toLogAxis
and leaves it unchanged otherwise. trYAxisType can be set toLogAxis
without error only when the Y-Axis coordinate extent as passed from the ScalarField is entirely positive. If this is not the case, trYAxisType will default toLinearAxis
.
CurvilinearTransformation resources
ContourPlot uses the CurvilinearTransformation to handle its transformations if the ScalarField array resources sfXArray and sfYArray are set with two-dimensional arrays and the Transformation class resource trGridType is set toCurvilinear
. The
CurvilinearTransformation class has no
user-accessible resources.SphericalTransformation resources
ContourPlot uses the SphericalTransformation to handle its transformations if the ScalarField array resources sfXArray and sfYArray are set with two-dimensional arrays and the Transformation class resource trGridType is set toSpherical
. The SphericalTransformation
class has no user-accessible resources.TriangularMeshTransformation resources
ContourPlot uses the TriangularMeshTransformation to handle its transformations if cnScalarFieldData is set using a MeshScalarField object, or otherwise if the Transformation class resource trGridType is explicitly set toTriangularMesh
. The
TriangularMeshTransformation class has no
user-accessible resources.
PlotManager resources
If tfPlotManagerOn is True when a ContourPlot object
is created, you can access all PlotManager resources.
However, note that ContourPlot intercepts certain
PlotManager resources, as follows:
-
- pmLegendDisplayMode
- The default value of pmLegendDisplayMode is set to
Never
.
-
- pmLabelBarDisplayMode
- The default value of pmLabelBarDisplayMode is set to
Never
.
-
- pmTickMarkDisplayMode
- The default value of pmTickMarkDisplayMode is set to
Conditional
.
-
- pmTitleDisplayMode
- The default value of pmTitleDisplayMode is set to
Conditional
.
- TickMark resources as modified by PlotManager
- Title resources as modified by PlotManager
- LabelBar resources as modified by PlotManager
- Legend resources as modified by PlotManager
Additional modifications to LabelBar resources
The ContourPlot class disables a number of LabelBar resources, since it sets them automatically based on the current values of certain relevant ContourPlot resources. The disabled resources include:- lbBoxCount
- lbMonoFillColor
- lbFillColor
- lbFillColors
- lbMonoFillPattern
- lbFillPattern
- lbFillPatterns
- lbMonoFillScale
- lbFillScaleF
- lbFillScales
-
- lbLabelStrings
- Any set value of this resource is ignored unless the ContourPlot resource cnExplicitLabelBarLabelsOn is set True.
-
- lbLabelFuncCode
- Any set value of this resource is ignored unless the ContourPlot resource cnExplicitLabelBarLabelsOn is set True.
-
- lbLabelAlignment
- Any set value of this resource is ignored unless the ContourPlot resource cnExplicitLabelBarLabelsOn is set True.
Additional modifications to Legend resources
The ContourPlot object disables a number of Legend resources, since it sets them automatically based on the current values of certain relevant ContourPlot resources. The disabled resources include:- lgItemCount
- lgMonoItemType
- lgItemType
- lgItemTypes
- lgMonoDashIndex
- lgDashIndex
- lgDashIndexes
- lgMonoLineColor
- lgLineColor
- lgLineColors
- lgMonoLineThickness
- lgLineThicknessF
- lgLineThicknesses
- lgMonoLineDashSegLen
- lgLineDashSegLenF
- lgLineDashSegLens
- lgMonoMarkerIndex
- lgMarkerIndex
- lgMarkerIndexes
- lgMonoMarkerColor
- lgMarkerColor
- lgMarkerColors
- lgMonoMarkerThickness
- lgMarkerThicknessF
- lgMarkerThicknesses
- lgMonoMarkerSize
- lgMarkerSizeF
- lgMarkerSizes
- lgMonoLineLabelFontHeight
- lgLineLabelFontHeightF
- lgLineLabelFontHeights
- lgMonoLineLabelFontColor
- lgLineLabelFontColor
- lgLineLabelFontColors
- lgLineLabelStrings
- lgLineLabelFontAspectF
- lgLineLabelFontThicknessF
- lgLineLabelFontQuality
- lgLineLabelConstantSpacingF
- lgLineLabelFuncCode
-
- lgLabelStrings
- Any set value of this resource is ignored unless the ContourPlot resource cnExplicitLabelBarLabelsOn is set True.
-
- lgLabelFuncCode
- Any set value of this resource is ignored unless the ContourPlot resource cnExplicitLabelBarLabelsOn is set True.
Superclass resources
You can set all resources defined by the superclasses of the ContourPlot object class, including:
Description
The ContourPlot object draws a contour plot from two-dimensional data provided by an object belonging to the ScalarField class. The plot may consist only of lines, or may be filled using color and/or fill patterns to distinguish the various contour regions. You can control how the contour levels are selected. Selected contour levels, as well as regional high and low points, may be labeled. You can cause a number of annotational items to appear, including an informational label, tick marks, titles, a labelbar, and a line legend. These items automatically adjust themselves to the current state of the ContourPlot object. You may also differentiate certain special areas with unique lines or fill, and control to some extent the algorithms used to generate the contour lines.The ContourPlot object provides what may seem like an overwhelming number of resources, but keep in mind that generally you will need to use only a few of them. In fact, there is only one resource you need to set explicitly in order to generate a meaningful contour plot. You need to focus only on resources that modify the features of the ContourPlot object that are important to you. All the others will default to generally usable values. Moreover, resources that provide control over related attributes of the various ContourPlot elements have related names. As an example, all resources that specify the color of the text used for the various labels available in the ContourPlot object have names of the form cn...LabelFontColor(s), where the plural form is used for resources that represent arrays.
Data input
The only resource you must set in order to generate an actual contour plot is cnScalarFieldData. This resource specifies the id of a pre-existing object belonging to the ScalarField class or its sub-class MeshScalarField. Note that both regular ScalarField and MeshScalarField objects belong to the ScalarField class. Therefore they are both ScalarField objects.
Use a regular ScalarField object for topologically rectangular gridded data. This is data that can be specified using a two-dimensional array with the common property that, for any interior element of the array e[j,i], a line through the location of the 8 elements e[j +/- 1, i +/- 1] would separate the element e[j,i] from the locations in data space of all other elements. You may define the coordinate space of the ScalarField data array using 1 or 2 dimensional coordinate arrays, or simply by setting the start and end locations along each axis. If you do not set any coordinate array resources the coordinate space defaults to the the array index extents.
Use a MeshScalarField if the data cannot be specified using a two-dimensional array as described above, but you can specify the location of each data element explicitly. You must set each data value and its location along the X and Y Axes as the corresponding elements of three one-dimensional arrays. You may explicitly or implicitly specify the mesh to be created from the data nodes using MeshScalarField resources. If you do not specify the mesh, ContourPlot generates it by calculating a Delauney triangulation in the projection plane, using Jonathan Shewchuk's Triangle package. A ScalarField object accepts data in a variety of types and configurations and allows you to specify how it is to be interpreted. As received by the ContourPlot object, the data are accompanied by information specifying the extents of the data in the data coordinate system and the minimum and maximum data values.
Coordinate transformations
ContourPlot intrinsically supports linear, logarithmic, and irregular rectangular gridded data coordinate spaces.
ContourPlot also supports topologically rectangular grids defined using 2D coordinate arrays.
If the cnScalarFieldData is set using a MeshScalarField object, ContourPlot supports non-rectangular data spaces. These may include pre-defined triangular meshes or simply consist of singly-dimensioned data and location arrays.
ContourPlot instantiates child objects to manage transformations between the data coordinate system and NDC space. The LogLinTransformation manages linear and logarithmic transformations, and the IrregularTransformation manages the transformation if one or both axes are irregularly spaced. If the grid is defined using 2D coordinate arrays, ContourPlot instantiates either the CurvilinearTransformation or the SphericalTransformation to handle the transformations. ContourPlot uses the TriangularMeshTransformation to manage transformations for non-rectangular data meshes. Optionally, the TriangularMeshTransformation can be used for rectangular grids as well.
By default the data coordinate extents are based on the extents of the supplied ScalarField object data, but you may adjust them using resources belonging to the Transformation super-class.
Use of the LogLinTransformation object
ContourPlot uses a LogLinTransformation object as long as the ScalarField resources sfXArray and sfYArray are bothNULL
. The
coordinate extents of a linear axis may arbitrarily intersect or
encompass the data extent. If you set a logarithmic axis, then the
coordinate extent of that axis must be entirely positive, but
otherwise may intersect or extend beyond the data extent.
Use of the IrregularTransformation object
If either of the ScalarField coordinate array resources sfXArray and sfYArray are non-NULL
and they are not set with 2D arrays, ContourPlot uses an
IrregularTransformation object. Note that
ContourPlot treats an axis with an associated
coordinate array as irregular even if the coordinate array actually
has evenly spaced values. ContourPlot represents an
irregular axis not by stretching and compressing various regions of the plot,
but by displaying it with irregularly spaced tick marks.
In addition to a small performance penalty, there are some
restrictions associated with use of the
IrregularTransformation object. Although you may
limit the coordinate extent to a subspace of the data coordinate
extent of the ScalarField object data, you are not
allowed to define a coordinate range that extends outside the range of
the data coordinates of an irregular axis. Using the
IrregularTransformation resources trXAxisType or
trYAxisType,
it is possible to set an irregular axis to LinearAxis
or
even, under certain conditions, to LogAxis
, but the
results are probably not what you want. Since
ContourPlot does not intrinsically support a
linearization transformation for irregularly spaced data, it can only
switch to a linear system by replacing the data coordinates with array
index coordinates, which are, in fact, linearly spaced. To properly
transform irregularly spaced data into a linear or logarithmic
coordinate system, you must use the overlay mechanism (V4.1 Status Note 1).
Use of the CurvilinearTransformation object
If both the ScalarField coordinate array resources sfXArray and sfYArray are set using 2D coordinate arrays and the Transformation class resource trGridType is set toCurvilinear
ContourPlot uses a
CurvilinearTransformation object. As with the
IrregularTransformation you cannot set the
coordinate range outside, the range of the data. Also, since X and Y
coordinate locations both vary along the grid edges, tickmarks are
disabled. In order to place the the data in context, you need to
overlay the ContourPlot on another plot such as a
mapplot.
Use of the SphericalTransformation object
If both the ScalarField coordinate array resources sfXArray and sfYArray are set using 2D coordinate arrays and the Transformation class resource trGridType is set toSpherical
ContourPlot uses a
CurvilinearTransformation object. As with the
IrregularTransformation you cannot set the coordinate
range outside the range of the data. Also, since X and Y coordinate
locations both vary along the grid edges, tickmarks are disabled. In
order to place the the data in context, you need to overlay the
ContourPlot on another plot such as a
mapplot.
Use of the TriangularMeshTransformation object
If you set cnScalarFieldData using a MeshScalarField object, ContourPlot uses the TriangularMeshTransformation to perform transformations from data space into the plotting space. Optionally, if you set the Transformation resource trGridType toTriagularMesh
, ContourPlot can use
the TriangularMeshTransformation for normal
ScalarField data as well.
The TriangularMeshTransformation always transforms
the data space into a linear cartesian coordinate space, meaning it
will linearize irregularly gridded or non-rectangular mesh data
without requiring an overlay. In contrast to the behavior of
SphericalTransformation and
CurvilinearTransformation, tickmarks are enabled for
the TriangularMeshTransformation. You can overlay a
ContourPlot that uses the
TriangularMeshTransformation in the normal way.
Besides its primary use as the transformation engine for non-rectangular mesh data, the TriangularMeshTransformation may have performance advantages for some types of rectangular grids. Also, it can be used for for certain grids, such as 2D grids with missing values in the coordinate arrays, when the other Transformation classes would fail.
Currently, there are a few unresolved issues with the
TriangularMeshTransformation. When overlaid on a
mapplot, for certain projections, the edges of the
plot may have a ragged appearance and not completely fill the
projected data boundaries. This is particularly true when
cnFillMode is set to RasterFill
, but can also be
the case for AreaFill
if cnScalarFieldData is
set with a MeshScalarField object.
Prior to version 6.2.0, when a
MeshScalarField object provided the data, the
CellFill
mode was unavailable. Now it is possible to use the
CellFill
mode provided the vertices of each cell are specified
using the sfXCellBounds and
sfYCellBounds resources.
Overlays
By overlaying a ContourPlot on various types of base plot, it is possible to map contours of arbitrary ScalarField data into a variety of coordinate spaces. You can overlay a ContourPlot on a mapplot to transform the data into any of 10 different map projections. You can overlay contours of irregularly gridded data on a loglinplot to have the data appear in a linear or logarithmic coordinate space. You can also overlay any contoured data on an irregularplot, either to project regularly gridded data into an irregular coordinate space, or perhaps to overcome the data extent limitations of the ContourPlot's intrinsic IrregularTransformation object. You can overlay a ContourPlot on any type of base plot in a one-step operation using the NhlAddOverlay function.
Controlling draw order
The ContourPlot object allows you to control the order in which its major elements are drawn. You may separately control the drawing order for lines, fill, and labels using the resources cnLineDrawOrder, cnFillDrawOrder, and cnLabelDrawOrder. There are three drawing phases: the predraw phase, the draw phase, and the postdraw phase. By default, ContourPlot draws all plot elements during the draw phase: first the fill, then the lines, and finally the labels. When a ContourPlot is drawn by itself, this is usually a reasonable order that results in the important features of the plot being visible. However, when a ContourPlot object is overlaid over a base plot, particularly when masking is involved, you often need to adjust the drawing order to ensure that the features you want to see remain visible.
Note that annotations associated with the ContourPlot, including the informational and constant field labels, are always drawn during the postdraw phase.
Controlling annotations
The ContourPlot object supports three kinds of
annotations: those that it creates on its own, the informational and
constant field embedded annotations; those that
are created by its composite PlotManager object,
including Title, Tickmark,
LabelBar, and Legend intrinsic
annotations; and finally arbitrary user-defined external
annotations. The Transform class resource
tfPlotManagerOn must be set True
(its default value) when the ContourPlot object is
created in order for the intrinsic or external annotations to be
available. The informational label (and the constant field label under
the appropriate conditions) appear by default. Assuming tfPlotManagerOn is set True, tick marks
also appear by default. Titles appear if you set the appropriate title
string resource to any non-NULL string value. In order for a labelbar
or legend to appear, you must set the PlotManager
resources pmLabelBarDisplayMode
or pmLegendDisplayMode to the
values Conditional
or Always
.
Except for the tick marks and the titles, all these annotations are positioned using resources that follow the PlotManager Location Control Model. The ContourPlot object provides resources for controlling attributes of the informational and the constant field labels. You can control the resources of the objects that render the intrinsic annotations directly, subject to some access and behavioral modifications imposed by the PlotManager object and by the ContourPlot object itself. These objects are the TickMark object, the Title object, the LabelBar object, and theLegend object.
Selecting levels
By appropriately setting the cnLevelSelectionMode
resource, you can choose from four level-selection modes to set up the
levels used in the contour plot. The default mode,
AutomaticLevels
, is easy to use. It selects a "nice"
spacing starting from the smallest relatively round number greater
than the minimum data value, such that the number of contour levels is
as close as possible to, but less than, the value of the resource cnMaxLevelCount.
EqualSpacedLevels
mode defines exactly cnMaxLevelCount
levels spaced evenly from the data minimum value to the data maximum
value. In ManualLevels
mode, you set the maximum and
minimum contour levels using the resources cnMinLevelValF and
cnMaxLevelValF
with a spacing defined by the resource cnLevelSpacingF. Finally,
Explicit
mode allows you to define the level values
yourself by setting the array resource cnLevels. The
ManualLevels
and ExplicitLevels
modes have
the advantage that they are independent of the maximum and minimum
values of the particular dataset you are contouring, and therefore
can be used to enforce consistency in the contouring of a series of
related datasets. ExplicitLevels
is the only mode that
allows you to establish variably spaced contour levels.
Once you have established the contour levels, you can retrieve the number of levels actually used by getting the value of the read-only resource cnLevelCount. Based on this value, you can set the cnLevelFlags enumerated array resource to specify whether you want lines only, labels only, lines and labels, or nothing at each individual contour level. This resource also has a scalar equivalent, cnLevelFlag, which you can set instead if you want all levels to appear the same way. If you set neither of these resources, then line labels automatically appear at contour levels spaced apart by the value of the resource cnLineLabelInterval, set by default to the value 2.
Contour lines
You can control whether contour lines appear at all by setting the boolean resource cnLinesOn. By default it is set True, meaning that contour lines will appear. If set False, no contour lines will appear regardless of the setting of cnLevelFlags or cnLevelFlag. You can control the color, the dash pattern and the thickness of contour lines individually or uniformly as a group. Individual control is through the array resources cnLineColors, cnLineDashPatterns, and cnLineThicknesses while control as a group is through the scalar resources cnLineColor, cnLineDashPattern, and cnLineThicknessF. You choose the scalar resources by setting the boolean resources cnMonoLineColor, cnMonoLineDashPattern, and cnMonoLineThickness True; you choose the array resources by setting them False. There is also a scalar resource, cnLineDashSegLenF that sets the segment length for all dash patterns used.
Contour fill
ContourPlot supports three
methods for filling contour regions: area, raster and cell fill.
Turn on fill for contour regions by setting the boolean resource
cnFillOn True.
Select the fill method by setting the enumerated resource
cnFillMode
to one of the three choices: AreaFill
, RasterFill
,
or CellFill
.
Area fill
For area fill, you can control the color, the fill pattern, and the scale of the fill pattern for all filled contour regions either individually or uniformly as a group. Individual control is through the array resources, cnFillColors, cnFillPatterns, and cnFillScales while control as a group is through the scalar resources cnFillColor, cnFillPattern, cnFillDotSizeF, and cnFillScaleF. You choose the scalar resources by setting the boolean resources cnMonoFillColor, cnMonoFillPattern, and cnMonoFillScale True; you choose the array resources by setting them False.
Raster fill
ContourPlot performs raster fill by assigning appropriate colors to each cell of a two-dimensional array of equally sized rectangular cells superimposed on the area occupied by the data grid. If cnRasterSmoothingOn is set True, the level (and hence the color) assigned to each cell is determined by interpolating the values of neighboring points in the data grid. If cnRasterSmoothingOn is False (the default), ContourPlot creates a discrete raster plot: any raster cell whose center lies within the rectangular area bounded by lines halfway between each grid point (in data space) is given the color assigned to the level representing the grid point datum.
By default, ContourPlot dynamically tries to achieve an optimal size for the cell array based on the resolution of the workstation, the density of the data grid, the data transformation in effect, and whether smoothing is turned on. However, resources are provided for controlling the density of the raster cell grid. You can either set the cell size explicitly, using the resource cnRasterCellSizeF, or you can adjust the dynamically determined density, using the resource cnRasterSampleFactorF. The cnRasterMinCellSizeF resource sets a lower bound for the size of dynamically sized raster cells and consequently an upper limit on the raster cell density. Its purpose is to prevent the cell array from becoming unreasonably large for high-resolution workstations.
As with area fill, raster fill colors are specified using the cnFillColors resource. The fill pattern and fill scale resources are ignored when in raster fill mode.
Beginning with version 6.2.0, the raster fill mode fully supports
transparency and the Transparent
color index (-1). Previous versions substituted the Background
color whenever Transparent
was specified for a color index used in a raster fill context.
Cell fill
ContourPlot performs cell fill by drawing filled
polygons whose edges are defined by the borders between adjacent grid
cells. If the data grid is defined using cell edges, these boundaries
are obtained explicitly from the coordinate arrays. Otherwise,
the edges are calculated from the halfway points between the cell centers.
Optionally, you may draw lines around the edges by setting the
resource cnCellFillEdgeColor to a color other than the default: Transparent
. The
color of the edges of cells containing missing data values is controlled
using a separate resource cnCellFillMissingValEdgeColor.
As with area fill, cell fill colors are specified using the cnFillColors resource. The fill pattern and fill scale resources are ignored when in cell fill mode.
Beginning with version 6.2.0, the cell fill mode can render cells with 3, 4, 5, 6, or more vertices as supplied by various non-structured grids. The vertices of the cells must be explicitly specified using the resources sfXCellBounds and sfYCellBounds.
Labels
Almost two thirds of the ContourPlot object's resources involve attributes of various kinds of labels. This section describes the label types and classifies the label attributes.
ContourPlot supports five label types: line labels, high labels, low labels, an informational label, and a constant field label. The constant field label also has the ability to act as a label indicating that no data have been supplied. Each type has its own set of resources allowing individual control of the particular label type. The resources controlling label attributes have a generally uniform behavior for all label types. The resource names follow a consistent naming scheme for distinguishing the label types and their attributes. There are broadly three categories of label attributes that apply to all labels: those that control the content and format of the text string; those that control the appearance of the text, called font attributes; and those that control the appearance of the label background and perimeter. The informational and constant field labels support a fourth category of label attributes: those that control the location of the label. In addition to these general categories, there are several resources that apply globally to all label types, as well as a few that only apply to a single label type.
To simplify the management of label resources, there are several resources that allow you tie many of the resources of different label types together. cnLowUseHighLabelRes, when set True, causes all low label resources except cnLowLabelString to take on the value of the corresponding high label resource. Similarly, cnHighUseLineLabelRes, when set True, causes all high label resources except cnHighLabelString and cnHighLabelAngleF to take on the value of the corresponding line label resource. And finally, cnConstFUseInfoLabelRes, when set True, causes all constant field label resources except cnConstFLabelString to take on the value of the corresponding informational label resource.
Note that because of constraints imposed by the low level utilities, some attributes of high and low labels are tied together regardless of the setting of cnLowUseHighLabelRes. Also, the line label resources differ because several of them are array resources, allowing individual control of the labels that appear with each contour line.
The following sections discuss each label attribute category as it applies to all label types. The ellipsis marks (...) in the resource names below stand for the names of the label types:
- Line for line labels
- High for high labels
- Low for low labels
- Info for the informational label
- ConstF for the constant field label
String content and formatting attributes
These resources control the content and format of all the label types:- cn...Label(s)On
- Turns the label on and off. Line, high, and low labels use the plural form. The informational and constant field labels use the singular form.
- cn...LabelString(s)
- Specifies the text of the label. Line labels use the plural form to indicate an array of strings.
- cn...LabelFuncCode
- Sets the function code character used for the label text.
- cn...LabelFormat
- Specifies the format string used for numeric substitutions within the label text.
You specify the format string for numerical substitutions according to the HLU Floating Point Format Specification scheme. This scheme allows certain aspects of a number's format to be determined dynamically. The ContourPlot object uses this facility to allow you to base the formatting of all labels--in particular the assumed rightmost significant digit--on the dataset element with the maximum absolute value. The resource cnMaxDataValueFormat specifies a format for the dataset element with the maximum absolute value. The value and the format used together determine the specification of each dynamically specified format option for all label types.
The ContourPlot object recognizes a number of special substitution strings that are replaced on output with certain key values related to the dataset and the contour levels. How or whether a particular substitution string is recognized depends on the label type as follows:
- $CIU$
- The contour interval used (value of cnLevelSpacingF); informational label only.
- $CMN$
- The minimum contour level (first element of cnLevels); informational label only.
- $CMX$
- The maximum contour level (last element of cnLevels); informational label only.
- $SFU$
- The scale factor used (value of cnLabelScaleFactorF); informational label only.
- $ZMN$
- The minimum data value (value of ScalarField resource sfDataMinV); informational label only.
- $ZMX$
- The maximum data value (value of ScalarField resource sfDataMaxV); informational label only.
- $ZDV$
- The current low, high, and constant field value for low, high and constant field labels, respectively.
Font attributes
These resources set font attributes for all the label types:- cn...LabelFontHeightF
- Sets the height of the label text.
- cn...LabelFont
- Sets the font used for the label text.
- cn...LabelFontColor(s)
- Sets the color of the label text. Line labels use both the plural and singular form for array and scalar versions of the resource.
- cn...LabelFontAspectF
- Sets the height-to-width ratio of the characters used for the label text.
- cn...LabelFontThicknessF
- Sets the thickness of the lines used to draw fonts that are stroked rather than filled for the label text.
- cn...LabelFontQuality
- Sets one of three qualities of fonts to use for the label text.
- cn...LabelConstantSpacingF
- Determines whether the characters used for label text should have constant spacing, and if so, determines the spacing to use.
- cn...LabelAngleF
- Sets the angle at which the label text is drawn.
If the resource cnMonoLineLabelFontColor
is set True, ContourPlot uses the scalar resource cnLineLabelFontColor
for all line labels; otherwise it uses the array resource, cnLineLabelFontColors.
Also the resource cnLineLabelAngleF is
ignored if cnLineLabelPlacementMode
is set to Constant
.
Backgrounds and perimeter outline attributes
These resources set background and perimeter outline attributes for all the label types:- cn...LabelBackgroundColor
- Sets the background color for the area inside the label perimeter.
- cn...LabelPerim
- Turns the label perimeter outline on and off.
- cn...LabelPerimSpaceF
- Determines the amount of space between the edges of the label text and the label perimeter.
- cn...LabelPerimColor
- Sets the color used for the label perimeter line.
- cn...LabelPerimThicknessF
- Sets the thickness of the label perimeter line.
Constant
.
Location and density attributes
You can position the informational and constant field labels using resources that follow the PlotManager Location Control Model. These are:- cn...LabelZone
- Sets the overlay zone of the label.
- cn...LabelSide
- Sets the side on which the label will be located in the plot viewport.
- cn...LabelJust
- Sets the justification mode used to position the label.
- cn...LabelParallelPosF
- Sets the offset from the zone origin parallel to the viewport side.
- cn...LabelOrthogonalPosF
- Sets the offset from the zone origin orthogonal to the viewport side.
There are three ways to position line labels using the resource cnLineLabelPlacementMode. The Constant
mode is the most basic: the line
label is rendered as a part of the dash pattern. This implies that the
label density can be controlled by setting the
cnLineDashSegLenF
resource, which controls the length of the dash pattern.
For the other two methods, Randomized
and
Computed
, the labels are drawn separately from the
lines. You can increase or decrease the density of labels for these
modes using cnLineLabelDensityF.
For more precise control, you can set a number low level line label
positioning parameters using the cnConpackParams
resource.
Also you can control in a limited way the location of high and low labels with the resource cnHighLowLabelOverlapMode. There are no native resources for adjusting the high/low label density, but low level control is possible using cnConpackParams.
Special areas and boundaries
There are several boundaries within the viewport of a ContourPlot that separate regions where contours appear from regions where they do not: the boundaries of missing value areas, the data grid boundaries, and the boundaries of regions where the data coordinates map to an out-of-range value. Missing value areas lie in those portions of the data grid whose elements are set to the special signal missing value as set by the ScalarField object's sfMissingValueV resource. You can outline the boundaries of missing value areas and also fill the interior of these areas. On the other hand, you can only draw boundary lines of the data grid and the out-of-range regions.
You control the line attributes of the boundaries with the following resources. The ellipsis marks (...) in the resource names below stand for the names of the boundary types: MissingValue, Grid, or OutOfRange.
- cn...BoundPerim
- Turns the perimeter line on and off.
- cn...BoundPerimThicknessF
- Sets the thickness of the line used to draw the perimeter.
- cn...BoundPerimDashPattern
- Sets the dash pattern of the line used to draw the perimeter.
- cn...BoundPerimColor
- Sets the color of the line used to draw the perimeter.
Missing values areas have in addition the resources cnMissingValFillColor, cnMissingValFillPattern, and cnMissingValFillScaleF for controlling the fill attributes of the missing value areas. If the raster mode of contour filling is enabled, only the resource cnMissingValFillColor has any effect.
Contour line rendering control
There are several resources you can use to control the way ContourPlot draws the contour lines. The resource cnSmoothingOn controls whether the contour lines are smoothed (using cubic splines under tension). cnSmoothingTensionF and cnSmoothingDistanceF control parameters of the smoothing algorithm. The resource cnMaxPointDistanceF controls the accuracy with which contour lines near discontinuous points in the mapping are rendered.
Support functions
The ContourPlot object does not define any support functions, but inherits all the support functions available to its superclass.Status notes for Release 4.1
1. The support for irregular transformations is at a transitional stage. Eventually, ContourPlot will be able to perform transformations from irregular coordinates to linear and logarithmic coordinates without using the overlay mechanism. This will eliminate the need for a switch to the index coordinate system.
3. Under certain conditions when part of the data space is outside the viewport, the Computed line label placement mode seems to fail, and the plot appears without any line labels at all. This problem requires further investigation.
4. Large values of cnSmoothingTensionF above 10.0 or so often cause the ContourPlot object to improperly project lines out of the plotter frame. This needs to be examined more closely. Also note that when lines cross, contour fill often 'bleeds' out of its boundaries.
5. Since the ContourPlot object creates the informational label using an Annotation object managed by the PlotManager object, Conpack has no way of knowing the position of the Informational label. Therefore, there is no way to support the option of omitting high and low labels that overlap the informational label. For the time being at least, the type NhlTcnHighLowLabelOverlapMode maps directly to the Conpack internal parameter, 'HLO'. Therefore, numerically speaking, this type effectively has two values for each functionally unique enumerated value.
See also
- NhlCreate function
- NhlDestroy function
- NhlSetValues function
- NhlGetValues function
- NhlAddData function
- ScalarField object
- MeshScalarField object
- PlotManager object
- Title object
- TickMark object
- LabelBar object
- Legend object
- AnnoManager object
- DataComm object
- Transform object
- View object
- Base object