
ContourPlot (cn) Resources
- cnCellFillEdgeColor
-
If cnFillMode is set to
CellFill
, this resource specifies the color used to draw boundaries around the edges of the data grid cells that contain valid non-missing values. If set to the default value,Transparent
, the boundaries do not appear.You can use a color index value (integer) or a named color (string).
Default:
Transparent
(-1) - cnCellFillMissingValEdgeColor
-
If cnFillMode is set to
CellFill
, this resource specifies the color used to draw boundaries around the edges of the data grid cells that contain missing values. If set to the default value,Transparent
, the boundaries do not appear.You can use a color index value (integer) or a named color (string).
Default:
Transparent
(-1) - cnConpackParams
-
This string array resource allows you limited access to a number of
parameters belonging to the LLU Conpack package, in
order to control certain plot features for which
ContourPlot does not yet have native resources. Each
element of the array is a string consisting of a Conpack parameter
name and its desired value separated by the colon character. Here is
an example of its use in a resource file:
*cnConpackParams: (/ RC1:0.05 , RC2:0.1 , RC3:0.05 , \ PC1:7.0 , PC2:20.0 , PC3:120.0 , PC4:0.01 , PC5:0.05 , PC6:0.05 , \ PW1:0.0 , PW2:0.0 , PW3:0.0 , PW4:0.0 /)
If set programmatically, each string element would need to quoted as appropriate for the source language. The example given above includes all the parameters that affect the density of line labels when the cnLineLabelPlacementMode is set toRandomized
orComputed
. The example values should normally result in the appearance of more labels than the default settings. See the Conpack parameter descriptions for more information.Note that the only Conpack parameters accessible using the cnConpackParams resource are ones that ContourPlot does not set internally and are unlikely to have an interaction with parameters that ContourPlot does set. Here is a categorized list of the Conpack parameters that can be set using cnConpackParams:
Contour hachuring control
- HCL
- HCS
- HCF
High/low label density
- HLX
- HLY
Computed
placement mode ("Penalty scheme" in Conpack) label density- PC1
- PC2
- PC3
- PC4
- PC5
- PC6
- PW1
- PW2
- PW3
- PW4
Randomized
placement mode ("Regular scheme" in Conpack) label density- RC1
- RC2
- RC3
Point interpolation for lines and edges
- PIC
- PIE
Note that you cannot get the value of cnConpackParams. Attempts to do so will result in an error.
Default: NULL
- cnConstFEnableFill
-
Available in version 6.2.0 and later.
If the boolean resource cnConstFEnableFill is set to True, then in most cases, constant or near-constant fields will be rendered as a filled area, rather than having the contoured area remain blank. By default, the constant field informational text box will still appear; turn it off by setting cnConstFLabelOn to False.
In the future, cnConstFEnableFill will likely default to True, with cnConstFLabelOn defaulting to False unless contour line drawing is enabled.
Default: False
- cnConstFLabelAngleF
-
- This resource specifies the angle, in degrees, of the constant field label text and its surrounding box.
Default: 0.0
- This resource specifies the angle, in degrees, of the constant field label text and its surrounding box.
- cnConstFLabelBackgroundColor
-
- This resource sets the background color used to fill the box surrounding the constant field label. If you do not want the box to be filled at all, set cnConstFLabelBackgroundColor to
Transparent
(-1).You can use a color index value (integer) or a named color (string).
Default:
Background
(0) - This resource sets the background color used to fill the box surrounding the constant field label. If you do not want the box to be filled at all, set cnConstFLabelBackgroundColor to
- cnConstFLabelConstantSpacingF
-
- Normally when cnLineLabelFontQuality is set to
High
, the ContourPlot object writes constant field label text with proportional spacing. Setting the cnConstFLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of cnLineLabelConstantSpacingF. When cnLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when cnConstFLabelFontQuality is notHigh
. Values less than 0.0 result in an error and are replaced with the default value.Default: 0.0
- Normally when cnLineLabelFontQuality is set to
- cnConstFLabelFont
-
- This resource of type NhlTFont specifies the font used to render the constant field label.
Default: "pwritx"
- This resource of type NhlTFont specifies the font used to render the constant field label.
- cnConstFLabelFontAspectF
-
- This resource determines the shape of the constant field label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
Default: 1.3125
- This resource determines the shape of the constant field label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
- cnConstFLabelFontColor
-
- This resource specifies the color to use for drawing constant field label text.
You can use a color index value (integer) or a named color (string).
Default: True
- This resource specifies the color to use for drawing constant field label text.
- cnConstFLabelFontHeightF
-
- This resource controls the height, in NDC units, of characters used in the text of the constant field label. The character width scales proportionally, unless you also modify the aspect ratio using the cnConstFLabelFontAspectF resource. The constant field label text height scales with changes to the viewport width, unless you explicitly set cnConstFLabelFontHeightF during the same call.
Default: <dynamic> -- 0.012 for a viewport width of 0.6
- This resource controls the height, in NDC units, of characters used in the text of the constant field label. The character width scales proportionally, unless you also modify the aspect ratio using the cnConstFLabelFontAspectF resource. The constant field label text height scales with changes to the viewport width, unless you explicitly set cnConstFLabelFontHeightF during the same call.
- cnConstFLabelFontQuality
-
- This resource of type NhlTFontQuality determines the quality of the font used to draw the ContourPlot constant field label.
Default:
High
- This resource of type NhlTFontQuality determines the quality of the font used to draw the ContourPlot constant field label.
- cnConstFLabelFontThicknessF
-
- Sets the thickness of the line used to draw constant field label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnConstFLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
Default: 1.0
- Sets the thickness of the line used to draw constant field label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnConstFLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
- cnConstFLabelFormat
-
- The cnConstFLabelFormat resource is a string that specifies the printing format for the number generated from a substitution substring in the cnConstFLabelString according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
Default: "*+^sg"
- The cnConstFLabelFormat resource is a string that specifies the printing format for the number generated from a substitution substring in the cnConstFLabelString according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
- cnConstFLabelFuncCode
-
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the constant field label string.
Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.
Default: ~
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the constant field label string.
- cnConstFLabelJust
-
- This resource of type NhlTJustification, after constraint to an appropriate value based on cnConstFLabelSide, sets the justification of the constant field label annotation with respect to its base location. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
Default:
CenterCenter
- This resource of type NhlTJustification, after constraint to an appropriate value based on cnConstFLabelSide, sets the justification of the constant field label annotation with respect to its base location. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
- cnConstFLabelOn
-
- The ContourPlot object draws a constant field label annotation only when cnConstFLabelOn is set True and the ScalarField data are determined to have a single constant value within the limits of the available precision or when no ScalarField data are supplied.
Default: True
- The ContourPlot object draws a constant field label annotation only when cnConstFLabelOn is set True and the ScalarField data are determined to have a single constant value within the limits of the available precision or when no ScalarField data are supplied.
- cnConstFLabelOrthogonalPosF
-
- cnConstFLabelOrthogonalPosF sets the coordinate of the base location of the constant field label annotation orthogonal to the current cnConstFLabelSide and directed away from the center of the viewport. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
Default: 0.0
- cnConstFLabelOrthogonalPosF sets the coordinate of the base location of the constant field label annotation orthogonal to the current cnConstFLabelSide and directed away from the center of the viewport. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
- cnConstFLabelParallelPosF
-
- cnConstFLabelParallelPosF specifies the coordinate of the base location of the constant field label annotation parallel to the current cnConstFLabelSide and directed toward increasing NDC values. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
Default: 0.0
- cnConstFLabelParallelPosF specifies the coordinate of the base location of the constant field label annotation parallel to the current cnConstFLabelSide and directed toward increasing NDC values. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations.
- cnConstFLabelPerimColor
-
- This resource sets the color to use for drawing the perimeter of the constant field label box.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use for drawing the perimeter of the constant field label box.
- cnConstFLabelPerimOn
-
- cnConstFLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding the contour constant field label. If set False, no outline will be drawn.
Default: True
- cnConstFLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding the contour constant field label. If set False, no outline will be drawn.
- cnConstFLabelPerimSpaceF
-
- cnConstFLabelPerimSpaceF determines the spacing or margin between the text of the constant field label and the edge of the constant field label box as a fraction of the current label text height.
Default: 0.33
- cnConstFLabelPerimSpaceF determines the spacing or margin between the text of the constant field label and the edge of the constant field label box as a fraction of the current label text height.
- cnConstFLabelPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the constant field label box. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of the perimeter line around the constant field label box. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnConstFLabelSide
-
- This resource of type NhlTPosition determines where to place the constant field annotation in relation to the sides of the plot object. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations. Its value determines a coordinate system origin and the direction of the positional resources, cnConstFLabelParallelPosF and cnConstFLabelOrthogonalPosF. It also constrains the value of the cnConstFLabelJust appropriately. There are four settings, which behave as follows, unless cnConstFLabelZone is set to one of the special zones (0 or 1):
Top
- PlotManager locates the constant field label
annotation relative to a line that parallels the top viewport boundary.
cnConstFLabelOrthogonalPosF increases in the direction of
increasing NDC Y-Axis values and is constrained to positive values.
cnConstFLabelParallelPosF increases in the direction of
increasing NDC X-Axis values. cnConstFLabelJust is
constrained to
BottomRight
,BottomCenter
, orBottomLeft
. Bottom
- PlotManager locates the constant field label
annotation relative to a line that parallels the bottom viewport
boundary. cnConstFLabelOrthogonalPosF increases in the
direction of decreasing NDC Y-Axis values and is constrained to
positive values. cnConstFLabelParallelPosF increases in the
direction of increasing NDC X-Axis values. cnConstFLabelJust
is constrained to
TopRight
,TopCenter
, orTopLeft
. Right
- PlotManager locates the constant field label
annotation relative to a line that parallels the right viewport
boundary. cnConstFLabelOrthogonalPosF increases in the
direction of increasing NDC X-Axis values and is constrained to
positive values. cnConstFLabelParallelPosF increases in the
direction of increasing NDC Y-Axis values. cnConstFLabelJust
is constrained to
TopLeft
,CenterLeft
, orBottomLeft
. Left
- PlotManager locates the constant field label
annotation relative to a line that parallels the left viewport boundary.
cnConstFLabelOrthogonalPosF increases in the direction of
decreasing NDC X-Axis values and is constrained to positive values.
cnConstFLabelParallelPosF increases in the direction of
increasing NDC Y-Axis values. cnConstFLabelJust is
constrained to
TopRight
,CenterRight
, orBottomRight
.
Default:
Bottom
- This resource of type NhlTPosition determines where to place the constant field annotation in relation to the sides of the plot object. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations. Its value determines a coordinate system origin and the direction of the positional resources, cnConstFLabelParallelPosF and cnConstFLabelOrthogonalPosF. It also constrains the value of the cnConstFLabelJust appropriately. There are four settings, which behave as follows, unless cnConstFLabelZone is set to one of the special zones (0 or 1):
- cnConstFLabelString
-
- Specifies the string to use when drawing a constant field label. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring $ZDV$ with a number representing the constant field value. cnConstFLabelFormat determines the format of the number; its value will be scaled based on the value of cnLabelScaleFactorF.
Default: "CONSTANT FIELD - VALUE IS $ZDV$"
- Specifies the string to use when drawing a constant field label. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring $ZDV$ with a number representing the constant field value. cnConstFLabelFormat determines the format of the number; its value will be scaled based on the value of cnLabelScaleFactorF.
- cnConstFLabelTextDirection
-
- This resource of type NhlTTextDirection specifies the direction of the text in the constant field label. The choices are:
Down
- Each character is placed below the previous character in the text string.
Across
- Each character is placed to the right of the previous character in the text string.
Default:
Across
- This resource of type NhlTTextDirection specifies the direction of the text in the constant field label. The choices are:
- cnConstFLabelZone
-
- ContourPlot implements the constant field label as an embedded annotation. cnConstFLabelZone specifies the PlotManager zone assigned to the constant field annotation. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations. If cnConstFLabelZone is set to 0, the positional origin is the center of the plot viewport; otherwise it is on or outside one of the sides of the viewport.
If you create a ContourPlot object without an active PlotManager by setting tfPlotManagerOn False, then ContourPlot manages the constant field annotation by itself. In this case, the cnConstFLabelZone resource is not as meaningful.
Default: 0
- ContourPlot implements the constant field label as an embedded annotation. cnConstFLabelZone specifies the PlotManager zone assigned to the constant field annotation. The PlotManager Location Control Model requires this resource to allow control of the constant field label consistent with other annotations. If cnConstFLabelZone is set to 0, the positional origin is the center of the plot viewport; otherwise it is on or outside one of the sides of the viewport.
- cnConstFUseInfoLabelRes
-
If the boolean resource cnConstFUseInfoLabelRes is set True,
all the resources applying to the constant field, except for
cnConstFLabelString, take their value from the corresponding
informational label resources.
Default: False
- cnExplicitLabelBarLabelsOn
-
- This boolean resource allows you control the labels that appear in the ContourPlot LabelBar explicitly. When set True, ContourPlot does not block the LabelBar resources lbLabelStrings and lbLabelAlignment. Therefore you can directly control both the contents of the LabelBar's label strings and their alignment with respect to the label boxes. When cnExplicitLabelBarLabelsOn is set False, ContourPlot sets both of these resources based on the current contour line labels and the value of the resource cnLabelBarEndStyle (as of version 5.0.0 or later) or (prior to version 5.0.0 or if cnLabelBarEndStyle is not set) cnLabelBarEndLabelsOn. If you set this resource True but do not set the lbLabelStrings array resource, ContourPlot will set it for you one time. This allows you to get an initial set of strings as a starting point for any customized tweaking you want to perform.
Default: False
- This boolean resource allows you control the labels that appear in the ContourPlot LabelBar explicitly. When set True, ContourPlot does not block the LabelBar resources lbLabelStrings and lbLabelAlignment. Therefore you can directly control both the contents of the LabelBar's label strings and their alignment with respect to the label boxes. When cnExplicitLabelBarLabelsOn is set False, ContourPlot sets both of these resources based on the current contour line labels and the value of the resource cnLabelBarEndStyle (as of version 5.0.0 or later) or (prior to version 5.0.0 or if cnLabelBarEndStyle is not set) cnLabelBarEndLabelsOn. If you set this resource True but do not set the lbLabelStrings array resource, ContourPlot will set it for you one time. This allows you to get an initial set of strings as a starting point for any customized tweaking you want to perform.
- cnExplicitLegendLabelsOn
-
- This boolean resource allows you control the labels that appear in the ContourPlot Legend explicitly. When set True, ContourPlot does not block the Legend resource lgLabelStrings. Therefore you can directly control the content of the Legend's label strings. When cnExplicitLegendLabelsOn is set False, ContourPlot sets lgLabelStrings based on the value of the current contour line labels. If you set this resource True but do not set the lgLabelStrings array resource, ContourPlot will set it for you one time. This allows you to get an initial set of strings as a starting point for any customized tweaking you want to perform.
Default: False
- This boolean resource allows you control the labels that appear in the ContourPlot Legend explicitly. When set True, ContourPlot does not block the Legend resource lgLabelStrings. Therefore you can directly control the content of the Legend's label strings. When cnExplicitLegendLabelsOn is set False, ContourPlot sets lgLabelStrings based on the value of the current contour line labels. If you set this resource True but do not set the lgLabelStrings array resource, ContourPlot will set it for you one time. This allows you to get an initial set of strings as a starting point for any customized tweaking you want to perform.
- cnExplicitLineLabelsOn
-
- This boolean resource controls the way ContourPlot handles the cnLineLabelStrings array resource. When set True, ContourPlot will not modify explicitly set values of the line label strings. When cnExplicitLineLabelsOn is set False, ContourPlot ignores values of cnLineLabelStrings set by the user.
Default: False
- This boolean resource controls the way ContourPlot handles the cnLineLabelStrings array resource. When set True, ContourPlot will not modify explicitly set values of the line label strings. When cnExplicitLineLabelsOn is set False, ContourPlot ignores values of cnLineLabelStrings set by the user.
- cnFillBackgroundColor
-
This resource of type
NhlTColorIndex or a named color (string)
sets the background color used for ContourPlot fill
patterns. It only has an effect for fill patterns that are neither
SolidFill
norHollowFill
. By default, this resource is set toTransparent
, resulting in the underlying background appearing in the spaces between the elements of the fill pattern. If set to any other valid color index, the specified color will solidly fill all spaces between the fill pattern elements.Default:
Transparent
(-1) - cnFillColor
-
When cnMonoFillColor is set True, this resource of type
NhlTColorIndex or a named color (string)
sets a uniform fill color for all contour fill areas.
Default:
Foreground
(1) - cnFillColors
-
The elements of this array of type NhlTColorIndexGenArray
can be set using an array of color indexes, an array of
named colors, or an array
of RGB
or RGBA values. If cnMonoFillColor
is
False
, each member of the array specifies the color of a contour fill area. Note that there is always one more fill area than there are contour levels. The first element of cnFillColors specifies the fill color for any region containing a data value less than the value of cnMinLevelValF, while the highest currently used element of cnFillColors specifies the fill color for regions containing data values greater than the value of cnMaxLevelValF.Although backwards compatibility is for the most part maintained, beginning with version 6.1.0, this resource supports the new 32-bit color model, as follows:
If cnFillColors is not set explicitly, its values are derived from the settings of cnFillPalette and cnSpanFillPalette, or, if cnFillPalette is not set, wkColorMap and cnSpanFillPalette. If cnSpanFillPalette is
True
, the values are distributed evenly through the range of colors available from cnFillPalette or wkColorMap. Otherwise, the values are sequential. If the color indexes are derived from cnFillPalette the first color comes from element 0, whereas if they are derived from wkColorMap, the first color comes from element 2. This is because wkColorMap contains special elements (0 and 1) for theBackground
andForeground
colors, whereas the palette-type resources do not. If some but not all of the available elements of cnFillColors are explicitly set, the remaining elements will be determined as if cnSpanFillPalette has the valueFalse
.For backwards compatibility, colors set based on wkColorMap remain indexed to the current color map associated with the workstation. Consequently, if the workstation color map is changed prior to drawing the plot, the color indexes will map into the new color map. In contrast, color indexes derived from the cnFillPalette resource always refer to a specific color regardless of changes to wkColorMap.
Default: <dynamic>
- cnFillDotSizeF
-
This resource sets a uniform dot size, in NDC
units, for the stipple dot fill
pattern. The default value of 0.0 causes the dots to be
drawn as before, using a workstation dependent minimum dot size. A
caveat is that individual dots are not clipped around the edges of
fill areas; this becomes more noticeable as the dot size increases.
Default: 0.0
- cnFillDrawOrder
-
This resource of type
NhlTDrawOrder determines
when areas of the contour plot are filled relative to the drawing of
other elements of the plot. There are three choices:
PreDraw
- Fill contour areas before the standard draw phase; fill areas will be overlaid by any subsequently drawn elements.
Draw
- Fill contour areas during the standard draw phase; the fill will overlay any elements drawn during the predraw phase, but will underlie elements drawn during the postdraw phase.
PostDraw
- Fill contour areas after the standard draw; the fill will overlay any elements drawn during the predraw and draw phases.
Default:
Draw
- cnFillMode
-
This resource of type
NhlTcnFillMode determines how ContourPlot performs fill when cnFillOn is
set True. There are three choices:
AreaFill
- The area between contour levels is decomposed into polygons. The
polygons are then filled based on the applicable fill color, fill
pattern, the scale factor assigned to the pattern, and, if stipple
fill (fill pattern 17) is specified, the size of the stippling dots.
The following resources can be used to control fill features when cnFillMode is set to
AreaFill
:- cnFillBackgroundColor
- cnMonoFillColor
- cnFillColor
- cnFillColors
- cnMonoFillPattern
- cnFillPattern
- cnFillPatterns
- cnFillDotSizeF
- cnMonoFillScale
- cnFillScaleF
- cnFillScales
- cnGridBoundFillColor
- cnGridBoundFillPattern
- cnGridBoundFillScaleF
- cnMissingValFillColor
- cnMissingValFillPattern
- cnMissingValFillScaleF
- cnOutOfRangeFillColor
- cnOutOfRangeFillPattern
- cnOutOfRangeFillScaleF
Currently when using
AreaFill
mode, and cnScalarFieldData is specified using a MeshScalarField object, and the ContourPlot is overlaid on certain map projections, the edges of the plot may have a ragged appearance and not completely fill the projected data boundaries. RasterFill
- ContourPlot generates a representation of the
data by individually assigning colors to the elements of a
two-dimensional array of rectangular cells (a raster array)
superimposed on an area bounding the data grid. With raster mode, only
solid fill is possible, and therefore resources related to fill
pattern specification have no effect. The color of each cell is
determined based on the fill color assigned to the data value at the
cell's location. If cnRasterSmoothingOn is set True, the data
value for each raster cell is interpolated from the values of data grid cells
in the neighborhood. Otherwise, each raster cell is assigned the color
associated with the grid cell within which the greatest proportion of its
area lies.
Beginning with version 6.2.0, the
RasterFill
mode fully supports transparency in a manner similar to theAreaFill
andCellFill
modes. Prior to version 6.2.0, if a fill index ofTransparent
was set for any cell of a raster fill plot, theBackground
fill color was used instead.The following resources can be used to control fill features when cnFillMode is set to
RasterFill
:- cnFillColors
- cnGridBoundFillColor
- cnMissingValFillColor
- cnOutOfRangeFillColor
- cnRasterSmoothingOn
- cnRasterMinCellSizeF
- cnRasterSampleFactorF
- cnRasterCellSizeF
Currently when using
RasterFill
mode, and trGridType is set toTriangularMesh
, and the ContourPlot is overlaid on certain map projections, the edges of the plot may have a ragged appearance and not completely fill the projected data boundaries. CellFill
- 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, the cell
boundaries are obtained explicitly from the coordinate
arrays.
Otherwise, the edges are assumed to pass through the halfway
points in data grid space between the cell centers. Optionally, you
may draw lines around the edges using the cell fill edge resources. As
with raster fill, pattern fill is not supported.
Beginning with version 6.2.0, the
CellFill
mode supports rendering of unstructured grids, including triangular grids, quadrilateral grids that cannot be fully defined using a 2D array, and geodesic grids with 5, 6, or more sided cells. In order to render such grids, the vertices of each cell must be explicitly specified using the MeshScalarField resources sfXCellBounds and sfYCellBounds.The following resources can be used to control fill features when cnFillMode is set to
CellFill
:- cnMonoFillColor
- cnFillColor
- cnFillColors
- cnMissingValFillColor
- cnCellFillEdgeColor
- cnCellFillMissingValEdgeColor
Prior to version 6.2.0, the
CellFill
mode was not available when cnScalarFieldData was specified using a MeshScalarField object.
Default:
AreaFill
- cnFillOn
-
This boolean resource controls whether the areas between contour levels
are filled with a solid color and/or, if the fill method permits it,
a fill pattern. You can choose between three fill methods by setting
the resource cnFillMode.
Default: False
- cnFillOpacityF
-
Available in version 6.1.0 and later.
Specifies the opacity of the fill colors of a contour plot. Give a value in the range of 0.0 (completely transparent) to 1.0 (fully opaque).
Default: 1.0
- cnFillPalette
-
Available in version 6.1.0 and later.
This resource of type NhlTColorDefinitionGenArray allows you to set a color palette from which the values assigned to cnFillColors are chosen.
You can set this resource to the string name of a predefined color map, an array of named colors, or an array of RGB or RGBA values. If you set cnFillPalette using a predefined color map, it will have two fewer elements than if you set wkColorMap using the same color map. This is because the wkColorMap resource contains special elements (0 and 1) for the
Background
andForeground
colors, whereas the palette-type resources do not. Use cnSpanFillPalette to indicate whether to span the full color palette or to simply use sequentially increasing values.Default:
None
- cnFillPattern
-
When cnMonoFillPattern is set True, this resource of type
NhlTFillIndex
sets a
uniform pattern for all
contour fill areas.
Default:
SolidFill
- cnFillPatterns
-
If cnMonoFillPattern is False, each element of this array of
type
NhlTFillIndexGenArray
specifies the
fill pattern used
for a contour fill area. Note that there is always one more fill area
than there are contour levels. The first element of
cnFillPatterns specifies the fill pattern for any region
containing a data value less than the value of
cnMinLevelValF, while the highest currently used element of
cnFillPatterns specifies the fill pattern for regions
containing data values greater than the value of
cnMaxLevelValF. If the array is not set explicitly, the
ContourPlot object will assign sequential fill
pattern indexes (starting with fill index 1--not "SolidFill", which
is fill index 0) to each array element up to the maximum number of
existing fill patterns. Thereafter it will repeat the sequence using
modular arithmetic. If the array currently contains fewer elements
than cnLevelCount+1, more elements will be added to
the array and given values according to the same assignment scheme;
existing elements with valid fill pattern index values will not be
modified.
Default: <dynamic>
- cnFillScaleF
-
When cnMonoFillScale is True, this resource sets a uniform
scaling value for all contour fill patterns.
Default: 1.0
- cnFillScales
-
When cnMonoFillScale is False, the cnFillScales
array resource allows individual control of the scaling of the pattern
used for each contour fill area. It has no effect for solid fill (fill
pattern
"SolidFill"
, index 0). Values greater than 1.0 make the pattern spacing bigger than the default spacing, resulting in a fill that appears less dense. Values less than 1.0 have the opposite effect. Values less than or equal to 0.0 are invalid, generate a warning message, and are reset to the default value, 1.0.Note that there is always one more fill area than there are contour levels. If the array is not set explicitly, the ContourPlot object will assign the value 1.0 to all elements of the array. If the array currently contains fewer elements than cnLevelCount+1, more elements will be added to the array and given the same default value of 1.0; existing elements with valid fill scale index values will not be modified.
Default: 1.0 for all elements
- cnFixFillBleed
-
When cnFillOn is set True and cnFillMode is
set to
AreaFill
, ContourPlot performs area fill. Occasionally, due to limitations of the area rendering algorithm, this mode of fill fails and colors "bleed" out into areas they do not belong. If you have this kind of problem with your plot, it will probably be fixed if you set the resource cnFixFillBleed to True.However, there are certain kinds of plots that have problems when cnFixFillBleed is set True, and so far there is no clear algorithm for distinguishing these. Therefore, the corrections that are applied as a result of setting cnFixFillBleed cannot be yet be unconditionally coded into ContourPlot. Eventually, it is hoped that the need for this resource will be eliminated.
Default: True (was False in NCL versions 6.0.0 and earlier)
- cnGridBoundFillColor
-
- Available in version 6.0.0 and later.
This resource sets the color to use for filling areas outside the boundaries of the data grid, but within the viewport and the projectable areas of the underlying map, if any. cnFillOn must be set to True and cnGridBoundFillPattern must have a value other than
HollowFill
(-1) for this resource to have an effect.You can use a color index value (integer) or a named color (string).
Prior to version 6.2.0, if cnFillMode was set to
RasterFill
, theBackground
color was substituted ifTransparent
was specified for cnGridBoundFillColor. This resource is not supported for cnFillMode set toCellFill
. Also note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set toTriangularMesh
, the color index used will be the larger value of those assigned to the resources cnMissingValFillColor and cnGridBoundFillColor.Note that when this resource has a value other than
Transparent
and cnGridBoundFillPattern has a value other thanHollowFill
the value of cnMaxPointDistanceF is ignored. The underlying parameter it normally controls is constrained to the value 0.001. This is because the grid boundary needs to be calculated more precisely in this instance in order to correctly generate the fill areas on each side of the grid boundary.Default:
Transparent
(0) - Available in version 6.0.0 and later.
- cnGridBoundFillPattern
-
- Available in version 6.0.0 and later.
This resource sets the fill pattern index used to fill areas outside the boundaries of the data grid, but within the viewport and the projectable areas of the underlying map, if any. cnFillMode must be set to
AreaFill
, cnFillOn must be set to True, and cnGridBoundFillColor must have a value other thanTransparent
(-1) for this resource to have an effect.If cnFillMode is set to
RasterFill
onlySolidFill
is possible. This resource is not supported for cnFillMode set toCellFill
.Note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set to
TriangularMesh
, the fill index used will be the larger value of those assigned to the resources cnMissingValFillPattern and cnGridBoundFillPattern.Default:
SolidFill
- Available in version 6.0.0 and later.
- cnGridBoundFillScaleF
-
- Available in version 6.0.0 and later.
The cnGridBoundFillScaleF resource controls the scaling of the pattern used for areas outside the boundaries of the data grid, but within the viewport and the projectable areas of the underlying map, if any. It has no effect for solid fill (fill pattern index
Solid
or 0) or whenever fill patterns are not enabled. Values greater than 1.0 make the pattern spacing bigger than the default spacing, resulting in a fill that appears less dense. Values less than 1.0 have the opposite effect. Values less than or equal to 0.0 are invalid, generate a warning message, and are reset to the default value, 1.0.Note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set to
TriangularMesh
, the fill scale used will be the value assigned to cnMissingValFillScaleF unless it is set to the default value, 1.0. In that case it will be the value assigned to cnGridBoundFillScaleF.This resource is not supported for cnFillMode set to
CellFill
.Default: 1.0
- Available in version 6.0.0 and later.
- cnGridBoundPerimColor
-
- This resource sets the color to use for drawing the perimeter line around the grid boundary.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use for drawing the perimeter line around the grid boundary.
- cnGridBoundPerimDashPattern
-
- This resource sets the HLU index of a dash pattern used to render the perimeter line around the grid boundary.
Default: 0
- This resource sets the HLU index of a dash pattern used to render the perimeter line around the grid boundary.
- cnGridBoundPerimOn
-
- If set True, this boolean resource specifies that a perimeter line be drawn around the grid boundary (extent of the ScalarField data) in the ContourPlot plot.
Default: False
- If set True, this boolean resource specifies that a perimeter line be drawn around the grid boundary (extent of the ScalarField data) in the ContourPlot plot.
- cnGridBoundPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the grid boundary. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of the perimeter line around the grid boundary. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnHighLabelAngleF
-
- This resource specifies the angle, in degrees, of high label text and its surrounding box. Due to constraints imposed by the low level utilities, it also controls the angle of the low label text, even when cnLowUseHighLabelRes is set False.
Default: 0.0
- This resource specifies the angle, in degrees, of high label text and its surrounding box. Due to constraints imposed by the low level utilities, it also controls the angle of the low label text, even when cnLowUseHighLabelRes is set False.
- cnHighLabelBackgroundColor
-
- This resource sets the background color used to fill the box surrounding each high label. If you do not want the box to be filled at all, set cnHighLabelBackgroundColor to
Transparent
(-1).Default:
Background
(0) - This resource sets the background color used to fill the box surrounding each high label. If you do not want the box to be filled at all, set cnHighLabelBackgroundColor to
- cnHighLabelConstantSpacingF
-
- Normally when cnLineLabelFontQuality is set to
High
, the ContourPlot object writes line label text with proportional spacing. Setting the cnLineLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of cnLineLabelConstantSpacingF. When cnLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when cnLineLabelFontQuality is notHigh
. Values less than 0.0 result in an error and are replaced with the default value.Default: 0.0
- Normally when cnLineLabelFontQuality is set to
- cnHighLabelCount
-
- Each time a ContourPlot is drawn, the read-only resource cnHighLabelCount is updated with the number of high labels actually rendered in the plot. Until the plot is drawn for the first time cnHighLabelCount has the value 0;
Default: 0
- Each time a ContourPlot is drawn, the read-only resource cnHighLabelCount is updated with the number of high labels actually rendered in the plot. Until the plot is drawn for the first time cnHighLabelCount has the value 0;
- cnHighLabelFont
-
- This resource of type NhlTFont specifies the font used to render high labels.
Default: "pwritx"
- This resource of type NhlTFont specifies the font used to render high labels.
- cnHighLabelFontAspectF
-
- This resource determines the shape of the high label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
Default: 1.3125
- This resource determines the shape of the high label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
- cnHighLabelFontColor
-
- This resource specifies the color to use for the high label text. If cnHighUseLineLabelRes is True, this resource takes its value from the first element of the cnLineLabelFontColors array.
You can use a colorindex value (integer) or a named color (string).
Default:
Foreground
(1) - This resource specifies the color to use for the high label text. If cnHighUseLineLabelRes is True, this resource takes its value from the first element of the cnLineLabelFontColors array.
- cnHighLabelFontHeightF
-
- This resource controls the height, in NDC units, of characters used in the text of high labels. The character width scales proportionally, unless you also modify the aspect ratio using the cnHighLabelFontAspectF resource. The high label text height scales with changes to the viewport width, unless you explicitly set cnHighLabelFontHeightF during the same call. Due to constraints imposed by the low level utilities, it also controls the font height of the low label text, even when cnLowUseHighLabelRes is set False.
Default: <dynamic> -- 0.012 for a viewport width of 0.6
- This resource controls the height, in NDC units, of characters used in the text of high labels. The character width scales proportionally, unless you also modify the aspect ratio using the cnHighLabelFontAspectF resource. The high label text height scales with changes to the viewport width, unless you explicitly set cnHighLabelFontHeightF during the same call. Due to constraints imposed by the low level utilities, it also controls the font height of the low label text, even when cnLowUseHighLabelRes is set False.
- cnHighLabelFontQuality
-
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot high labels.
Default:
High
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot high labels.
- cnHighLabelFontThicknessF
-
- Sets the thickness of the line used to draw high label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnHighLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
Default: 1.0
- Sets the thickness of the line used to draw high label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnHighLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
- cnHighLabelFormat
-
- The cnHighLabelFormat resource is a string that specifies the printing format for the numeric portion of high labels according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
Default: "*+^sg"
- The cnHighLabelFormat resource is a string that specifies the printing format for the numeric portion of high labels according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
- cnHighLabelFuncCode
-
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the high label string.
Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.
Default: ~
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the high label string.
- cnHighLabelPerimColor
-
- This resource sets the HLU color index used to draw the perimeter of the high label box.
Default:
Foreground
(1) - This resource sets the HLU color index used to draw the perimeter of the high label box.
- cnHighLabelPerimOn
-
- cnHighLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour high labels. If set False, no outline will be drawn.
Default: True
- cnHighLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour high labels. If set False, no outline will be drawn.
- cnHighLabelPerimSpaceF
-
- cnHighLabelPerimSpaceF determines the spacing or margin between the text of the high label and the edge of the high label box as a fraction of the current high label text height.
Default: 0.33
- cnHighLabelPerimSpaceF determines the spacing or margin between the text of the high label and the edge of the high label box as a fraction of the current high label text height.
- cnHighLabelPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the high label box. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of the perimeter line around the high label box. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnHighLabelString
-
- Specifies the string to use when drawing high labels. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring "$ZDV$" with a number representing the value at the point where the label is to appear. cnHighLabelFormat determines the format of the number and cnLabelScaleFactorF determines the scaling of the actual data value.
Default: "H~B~$ZDV$~E~"
- Specifies the string to use when drawing high labels. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring "$ZDV$" with a number representing the value at the point where the label is to appear. cnHighLabelFormat determines the format of the number and cnLabelScaleFactorF determines the scaling of the actual data value.
- cnHighLabelsOn
-
- If this boolean resource is set True, ContourPlot places labels at regions representing local maximums in the dataset.
Default: False
- If this boolean resource is set True, ContourPlot places labels at regions representing local maximums in the dataset.
- cnHighLowLabelOverlapMode
-
cnHighLowLabelOverlapMode is a resource of type
NhlTcnHighLowLabelOverlapMode. It controls how high and low labels are allowed to overlap other elements of
the ContourPlot plot and has six possible settings:
IgnoreOverlap
- The ContourPlot object does nothing to prevent high and low labels from overlapping other elements of the ContourPlot plot.
OmitOverHL
- The ContourPlot object omits high and low labels that would overlap previously determined high or low labels.
OmitOverVP
- The ContourPlot object omits high and low labels that would overlap the edge of the viewport.
OmitOverVPAndHL
- The ContourPlot object omits high and low labels that would overlap the edge of the viewport or previously determined high or low labels.
AdjustVP
- The ContourPlot object adjusts the position of high and low labels that would overlap the edge of the viewport enough to eliminate the problem.
AdjustVPOmitOverHL
- The ContourPlot object adjusts the position of high and low labels that would overlap the edge of the viewport enough to eliminate the problem and omits high and low labels that would overlap previously determined high or low labels.
Default:
IgnoreOverlap
- cnHighUseLineLabelRes
-
If the boolean resource cnHighUseLineLabelRes is set True,
all resources applying to high labels, except for
cnHighLabelString and cnHighLabelAngleF, take their
value from the corresponding line label resources.
Default: False
- cnInfoLabelAngleF
-
- This resource specifies the angle, in degrees, of the informational label text and its surrounding box.
Default: 0.0
- This resource specifies the angle, in degrees, of the informational label text and its surrounding box.
- cnInfoLabelBackgroundColor
-
- This resource sets the background color used to fill the box surrounding the informational label. If you do not want the box to be filled at all, set cnInfoLabelBackgroundColor to
Transparent
(-1).You can use a color index value (integer) or a named color (string).
Default:
Background
(0) - This resource sets the background color used to fill the box surrounding the informational label. If you do not want the box to be filled at all, set cnInfoLabelBackgroundColor to
- cnInfoLabelConstantSpacingF
-
- Normally when cnLineLabelFontQuality is set to
High
, the ContourPlot object writes informational label text with proportional spacing. Setting the cnInfoLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of cnLineLabelConstantSpacingF. When cnLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when cnInfoLabelFontQuality is notHigh
. Values less than 0.0 result in an error and are replaced with the default value.Default: 0.0
- Normally when cnLineLabelFontQuality is set to
- cnInfoLabelFont
-
- This resource of type NhlTFont specifies the font used to render the informational label.
Default: "pwritx"
- This resource of type NhlTFont specifies the font used to render the informational label.
- cnInfoLabelFontAspectF
-
- This resource determines the shape of the informational label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
Default: 1.3125
- This resource determines the shape of the informational label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
- cnInfoLabelFontColor
-
- This resource specifies the color to use for the informational label text.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource specifies the color to use for the informational label text.
- cnInfoLabelFontHeightF
-
- This resource controls the height, in NDC units, of characters used in the text of the informational label. The character width scales proportionally, unless you also modify the aspect ratio using the cnInfoLabelFontAspectF resource. The info label text height scales with changes to the viewport width, unless you explicitly set cnInfoLabelFontHeightF during the same call.
Default: <dynamic> -- 0.012 for a viewport width of 0.6
- This resource controls the height, in NDC units, of characters used in the text of the informational label. The character width scales proportionally, unless you also modify the aspect ratio using the cnInfoLabelFontAspectF resource. The info label text height scales with changes to the viewport width, unless you explicitly set cnInfoLabelFontHeightF during the same call.
- cnInfoLabelFontQuality
-
- This resource of type NhlTFontQuality determines the quality of the font used to draw the ContourPlot informational label.
Default:
High
- This resource of type NhlTFontQuality determines the quality of the font used to draw the ContourPlot informational label.
- cnInfoLabelFontThicknessF
-
- Sets the thickness of the line used to draw informational label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnInfoLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
Default: 1.0
- Sets the thickness of the line used to draw informational label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnInfoLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
- cnInfoLabelFormat
-
- The cnInfoLabelFormat resource is a string that specifies the printing format for the numbers generated from substitution substrings in cnInfoLabelString according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
Default: "*+^sg"
- The cnInfoLabelFormat resource is a string that specifies the printing format for the numbers generated from substitution substrings in cnInfoLabelString according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
- cnInfoLabelFuncCode
-
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the informational label string.
Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.
Default: ~
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the informational label string.
- cnInfoLabelJust
-
- This resource of type NhlTJustification, after constraint to an appropriate value based on cnInfoLabelSide, sets the justification of the informational label annotation with respect to its base location. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
Default:
TopRight
- This resource of type NhlTJustification, after constraint to an appropriate value based on cnInfoLabelSide, sets the justification of the informational label annotation with respect to its base location. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
- cnInfoLabelOn
-
- If this boolean resource is set False, ContourPlot will not draw an informational label.
Default: True (False for gsn_csm contour routines when contour fill is turned on.)
- If this boolean resource is set False, ContourPlot will not draw an informational label.
- cnInfoLabelOrthogonalPosF
-
- cnInfoLabelOrthogonalPosF sets the coordinate of the base location of the informational label annotation orthogonal to the current cnInfoLabelSide and directed away from the center of the viewport. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
Default: 0.02
- cnInfoLabelOrthogonalPosF sets the coordinate of the base location of the informational label annotation orthogonal to the current cnInfoLabelSide and directed away from the center of the viewport. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
- cnInfoLabelParallelPosF
-
- cnInfoLabelParallelPosF specifies the coordinate of the base location of the informational label annotation parallel to the current cnInfoLabelSide and directed toward increasing NDC values. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
Default: 1.0
- cnInfoLabelParallelPosF specifies the coordinate of the base location of the informational label annotation parallel to the current cnInfoLabelSide and directed toward increasing NDC values. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations.
- cnInfoLabelPerimColor
-
- This resource sets the color to use for drawing the perimeter of the informational label box.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use for drawing the perimeter of the informational label box.
- cnInfoLabelPerimOn
-
- cnInfoLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding a contour informational label. If set False, no outline will be drawn.
Default: True
- cnInfoLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding a contour informational label. If set False, no outline will be drawn.
- cnInfoLabelPerimSpaceF
-
- cnInfoLabelPerimSpaceF determines the spacing or margin between the text of the informational label and the edge of the informational label box as a fraction of the current label text height.
Default: 0.33
- cnInfoLabelPerimSpaceF determines the spacing or margin between the text of the informational label and the edge of the informational label box as a fraction of the current label text height.
- cnInfoLabelPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the informational label box. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnInfoLabelSide
-
- This resource of type NhlTPosition determines where to place the informational annotation in relation to the sides of the plot object. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations. Its value determines a coordinate system origin and the direction of the positional resources, cnInfoLabelParallelPosF and cnInfoLabelOrthogonalPosF. It also constrains the value of cnInfoLabelJust appropriately. There are four settings that behave as follows, unless cnInfoLabelZone is set to one of the special zones (0 or 1):
Top
- PlotManager locates the informational label
annotation relative to a line paralleling the top viewport boundary.
cnInfoLabelOrthogonalPosF increases in the direction of
increasing NDC Y-Axis values and is constrained to positive values.
cnInfoLabelParallelPosF increases in the direction of
increasing NDC X-Axis values. cnInfoLabelJust is constrained
to
BottomRight
,BottomCenter
, orBottomLeft
. Bottom
- PlotManager locates the informational label
annotation relative to a line that parallels the bottom
viewport boundary. cnInfoLabelOrthogonalPosF increases in
the direction of decreasing NDC Y-Axis values and is constrained to
positive values. cnInfoLabelParallelPosF increases in the
direction of increasing NDC X-Axis values. cnInfoLabelJust is
constrained to
TopRight
,TopCenter
, orTopLeft
. Right
- PlotManager locates the informational label
annotation relative to a line that parallels the right viewport
boundary. cnInfoLabelOrthogonalPosF increases in the
direction of increasing NDC X-Axis values and is constrained to
positive values. cnInfoLabelParallelPosF increases in the
direction of increasing NDC Y-Axis values. cnInfoLabelJust is
constrained to
TopLeft
,CenterLeft
, orBottomLeft
. Left
- PlotManager locates the informational label
annotation relative to a line that parallels the left viewport boundary.
cnInfoLabelOrthogonalPosF increases in the direction of
decreasing NDC X-Axis values and is constrained to positive values.
cnInfoLabelParallelPosF increases in the direction of
increasing NDC Y-Axis values. cnInfoLabelJust is constrained
to
TopRight
,CenterRight
, orBottomRight
.
Default:
Bottom
- This resource of type NhlTPosition determines where to place the informational annotation in relation to the sides of the plot object. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations. Its value determines a coordinate system origin and the direction of the positional resources, cnInfoLabelParallelPosF and cnInfoLabelOrthogonalPosF. It also constrains the value of cnInfoLabelJust appropriately. There are four settings that behave as follows, unless cnInfoLabelZone is set to one of the special zones (0 or 1):
- cnInfoLabelString
-
- Specifies the string to use when drawing an informational label. The string may contain function codes and/or substitution substrings. ContourPlot will replace the following substrings with numeric values:
- $CIU$
- The contour interval used (value of cnLevelSpacingF)
- $CMN$
- The minimum contour level (first element of cnLevels)
- $CMX$
- The maximum contour level
- $SFU$
- The scale factor used (value of cnLabelScaleFactorF)
- $ZMN$
- The minimum data value
- $ZMX$
- The maximum data value
Default: "CONTOUR FROM $CMN$ TO $CMX$ BY $CIU$"
- Specifies the string to use when drawing an informational label. The string may contain function codes and/or substitution substrings. ContourPlot will replace the following substrings with numeric values:
- cnInfoLabelTextDirection
-
- This resource of type NhlTTextDirection specifies the direction of the text in the informational label. The choices are:
Down
- Each character is placed below the previous character in the text string.
Across
- Each character is placed to the right of the previous character in the text string.
Default:
Across
- This resource of type NhlTTextDirection specifies the direction of the text in the informational label. The choices are:
- cnInfoLabelZone
-
- ContourPlot implements the informational label as an embedded annotation. cnInfoLabelZone specifies the PlotManager zone assigned to the informational annotation. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations. If cnInfoLabelZone is set to 0, the positional origin is the center of the plot viewport; otherwise it is on or outside one of the sides of the viewport.
If you create a ContourPlot object without an active PlotManager by setting tfPlotManagerOn False, then ContourPlot manages the informational annotation by itself. In this case, the cnInfoLabelZone resource is not as meaningful.
Default: 3
- ContourPlot implements the informational label as an embedded annotation. cnInfoLabelZone specifies the PlotManager zone assigned to the informational annotation. The PlotManager Location Control Model requires this resource to allow control of the informational label consistent with other annotations. If cnInfoLabelZone is set to 0, the positional origin is the center of the plot viewport; otherwise it is on or outside one of the sides of the viewport.
- cnLabelBarEndLabelsOn
-
- When this boolean resource is set True and cnExplicitLabelBarLabelsOn is False, ContourPlot creates labels for the two ends of the LabelBar. The label at one end will be a string representation of the minimum value in the dataset, and at the other end will be a string representation of the maximum value in the dataset. Both strings will be formatted according to the format specification in effect for the other labels provided by ContourPlot to the LabelBar.
As of version 5.0.0 or later this resource is deprecated and is overridden by cnLabelBarEndStyle when both are set at the same time.
Default: False
- When this boolean resource is set True and cnExplicitLabelBarLabelsOn is False, ContourPlot creates labels for the two ends of the LabelBar. The label at one end will be a string representation of the minimum value in the dataset, and at the other end will be a string representation of the maximum value in the dataset. Both strings will be formatted according to the format specification in effect for the other labels provided by ContourPlot to the LabelBar.
- cnLabelBarEndStyle
-
Available in version 5.0.0 and later.
This enumerated resource of type NhlTLabelBarEndStyle allows you to select from among three styles for the ends of the ContourPlot LabelBar:
IncludeOuterBoxes
- The two end boxes represent the fill color and/or patterns used for areas of the plot where the data is below the minimum contour level or above the maximum contour level. The first and last labels, representing the minimum and maximum contour levels, are aligned with the interior boundaries of the outer boxes.
IncludeMinMaxLabels
- The two end boxes represent the fill color and/or patterns used for areas of the plot where the data is below the minimum contour level or above the maximum contour level. The first and last labels, representing the minimum and maximum values in the field, are aligned with the exterior boundaries of the outer boxes. However, if the minimum and/or maximum field values fall within the range specified by the minimum and maximum contour levels, one or both of these labels will be set to an empty string.
ExcludeOuterBoxes
- Only boxes representing fill colors and/or patterns between the minimum and maximum contour levels appear in the LabelBar. The first and last labels, representing the minimum and maximum contour levels, are aligned with the exterior boundaries of what have now become the outer boxes of the LabelBar. This setting is useful in cases where there exist maximum and minimum values that by the nature of the quantity always bound the data, e.g. probability or per cent cloud cover.
As of version 5.0.0 or later this resource overrides the now deprecated cnLabelBarEndLabelsOn when both are set at the same time.
Default:
IncludeOuterBoxes
- cnLabelDrawOrder
-
This resource of type
NhlTDrawOrder determines
when contour plot labels are drawn relative to the drawing of other elements
of the plot. There are three choices:
PreDraw
- Draw contour labels before the standard draw phase; the labels will be overlaid by any subsequently drawn elements.
Draw
- Draw contour labels during the standard draw phase; the labels will overlay any elements drawn during the predraw phase as well as fill and contour lines drawn during the standard draw phase, but will underlie elements drawn during the postdraw phase.
PostDraw
- Draw contour labels after the standard draw; the labels will overlay any elements drawn during the predraw and draw phases as well as lines and fill drawn during the postdraw phase.
Default:
Draw
- cnLabelMasking
-
This resource controls whether ContourPlot lines and fill
are masked in the areas where ContourPlot labels are to
appear. When working with raster type devices, it is seldom necessary
to mask for labels, since they can be made to solidly overlay the
areas where they appear. Also there is a noticeable performance penalty when
labels are masked, so the use of this option is discouraged unless it is
necessary.
Default: False
- cnLabelScaleFactorF
-
- cnLabelScaleFactorF is a read-only resource that contains the current scale factor that applies to ContourPlot object labels. Multiplying the numbers in the labels by the value of cnLabelScaleFactorF gives the actual data values the numbers represent. The ContourPlot object calculates its value based on the data value with the maximum absolute value, the current mode of the enumerated resource, cnLabelScalingMode, and perhaps the value of cnLabelScaleValueF. Its value may also be influenced by the number of significant digits specified by the format specification resource, cnMaxDataValueFormat. You may output the value of this resource in the informational label using the the substitution string "$SFU$".
Default: <dynamic>
- cnLabelScaleFactorF is a read-only resource that contains the current scale factor that applies to ContourPlot object labels. Multiplying the numbers in the labels by the value of cnLabelScaleFactorF gives the actual data values the numbers represent. The ContourPlot object calculates its value based on the data value with the maximum absolute value, the current mode of the enumerated resource, cnLabelScalingMode, and perhaps the value of cnLabelScaleValueF. Its value may also be influenced by the number of significant digits specified by the format specification resource, cnMaxDataValueFormat. You may output the value of this resource in the informational label using the the substitution string "$SFU$".
- cnLabelScaleValueF
-
- The interpretation of cnLabelScaleValueF depends on the value of the enumerated resource cnLabelScalingMode. When cnLabelScalingMode is set to
ScaleFactor
, data values are divided by the value of cnLabelScaleValueF to obtain the numbers appearing in ContourPlot object labels. If cnLabelScalingMode is set toConfineToRange
, the cnLabelScaleValueF represents an exclusive upper bound for the numbers used to represent the data values. For other values of cnLabelScalingMode, the cnLabelScaleValueF resource is ignored.Default: 1.0
- The interpretation of cnLabelScaleValueF depends on the value of the enumerated resource cnLabelScalingMode. When cnLabelScalingMode is set to
- cnLabelScalingMode
-
This resource of type
NhlTScalingMode
determines how to scale the numbers representing scalar field data
values in the ContourPlot object's
labels. cnLabelScalingMode applies to numbers that represent
data values in line labels, high and low labels, the informational
label, and the constant field label. There are five choices:
ScaleFactor
- The ContourPlot object divides the data value by the value of cnLabelScaleValueF to obtain the number that appears in the label.
ConfineToRange
- The ContourPlot object uses cnLabelScaleValueF as an exclusive upper bound. A scale factor is selected such that the number used to represent the data value with the maximum absolute value will be less than cnLabelScaleValueF, but greater than or equal to cnLabelScaleValueF divided by 10.0. As an example, setting cnLabelScaleValueF to 100.0 would result in a scaled number in the range 10.0 to 99.999....
TrimZeros
- The ContourPlot object selects a scale factor such that the number representing the data value with the maximum absolute value will have the fewest possible extra zeros. If the maximum absolute value were 245000, for instance, it would scale to 245. If it were 0.000245, it would scale to 0.245. (The zero conventionally placed before the decimal point of a number less than 1.0 is not considered.)
MaxSigDigitsLeft
- The ContourPlot object selects a scale factor such that the number representing the data value with the maximum absolute value will have its rightmost significant digit directly to the left of the decimal point. The number of significant digits is determined by the format string resource, cnMaxDataValueFormat.
AllIntegers
- The ContourPlot object selects a scale factor such that the numbers representing labeled contour levels (as determined by examination of the values of the cnLevelFlags array) can be rendered as integers.
Default:
ScaleFactor
- cnLegendLevelFlags
-
- This array resource of type NhlTcnLevelUseModeGenArray allows you to control which of the lines representing contour levels are to appear in the ContourPlot Legend. You can also control whether the lines that do appear are to get a line label. Although the type allows for four choices, this resource supports only three of them:
NoLine
- Do not draw a line representing this contour level in the Legend.
LineOnly
- Draw a line representing this contour level, but no label in the Legend.
LabelOnly
- Currently, if an element is set to this value, it is treated the
same as if it were set to
NoLine
. LineAndLabel
- Draw a line representing this contour level along with a line label in the Legend.
NoLine
.Default: NULL
- This array resource of type NhlTcnLevelUseModeGenArray allows you to control which of the lines representing contour levels are to appear in the ContourPlot Legend. You can also control whether the lines that do appear are to get a line label. Although the type allows for four choices, this resource supports only three of them:
- cnLevelCount
-
A read-only resource set to the actual number of levels chosen during
the level selection process.
Default: <dynamic>
- cnLevelFlag
-
When cnMonoLevelFlag is set True, this resource of type
NhlTcnLevelUseMode
sets the rendering of all contour levels to one of four possible
values:
NoLine
- No lines or labels appear.
LineOnly
- Lines but no labels appear.
LabelOnly
- Labels but no lines appear.
LineAndLabel
- Both lines and labels appear.
Default:
LineOnly
- cnLevelFlags
-
When cnMonoLevelFlag is False, cnLevelFlags is an
array of type
NhlTcnLevelUseModeGenArray
that allows you individual control over whether a line and/or a line
label is to appear at each contour level. It has no effect on contour
fill. There are four choices:
NoLine
- No lines or labels appear at the contour level.
LineOnly
- Lines but no labels appear at the contour level.
LabelOnly
- Labels but no lines appear at the contour level.
LineAndLabel
- Both lines and labels appear at the contour level.
If cnMonoLevelFlag is False and you do not explicitly set cnLevelFlags, the ContourPlot object will set its elements for you based on the value of cnLineLabelInterval. Elements will be set to
LineOnly
except that if cnLineLabelInterval is greater than 0, elements separated by the interval of cnLineLabelInterval will be set toLineAndLabel
. This effect will occur both at initialization and any time you explicitly set cnLineLabelInterval.Default: <dynamic>
- cnLevelSelectionMode
-
This enumerated resource of type
NhlTLevelSelectionMode
provides four methods for selecting the contour intervals displayed in
a plot:
AutomaticLevels
- Ordinarily this mode determines contour levels by picking a
spacing value from a set of relatively "round" numbers scaled by
powers of 10 to the range of the data. This set of numbers is as
follows: 1.0, 2.0, 2.5, 4.0, 5.0. The number of levels chosen will be
as close as possible to the value of cnMaxLevelCount without
exceeding it. Once the spacing is chosen, the minimum contour level is
set to the value of the least multiple of the spacing greater than the
minimum data value. Likewise the maximum contour level becomes the
greatest multiple of the spacing less than the maximum data value.
Based on these values, ContourPlot sets the resources
cnLevelSpacingF, cnMinLevelValF, and
cnMaxLevelValF appropriately.
On the other hand, if you explicitly set the resource cnLevelSpacingF to a valid value greater than 0.0 and less than the range of the data, it will be used as the interval spacing. The minimum and maximum levels are calculated as before. If as a consequence, cnMaxLevelCount is less than the number of levels so specified, it will be set to the number of levels actually needed. However, if the choice of spacing causes the absolute maximum number of levels, currently 255, to be exceeded, ContourPlot will issue a warning message and recalculate the spacing as previously described.
In any case, ContourPlot sets the elements of the array resource cnLevels to the values of the contour levels chosen and the read-only resource cnLevelCount to the number of levels.
ManualLevels
ManualLevels
mode bases the choice of contour levels on the values of the resources cnLevelSpacingF, cnMinLevelValF, and cnMaxLevelValF. Starting at cnMinLevelValF, contour levels are created at intervals spaced by the value of cnLevelSpacingF until cnMaxLevelValF is reached. The final contour level will always be cnMaxLevelValF. ContourPlot sets elements of the array resource cnLevels to the values of each contour level chosen and the read-only resource cnLevelCount to the number of levels. If the current value of cnMaxLevelCount is less than cnLevelCount, it is reset to the value of cnLevelCount. However, if the level count would exceed the absolute maximum number of levels, currently 255, ContourPlot issues a warning and chooses a new value of cnLevelSpacingF based on the value of cnMaxLevelCount.If you choose
ManualLevels
selection mode when the ContourPlot object is created, and if you do not set cnMinLevelValF, ContourPlot will choose levels as if you had setAutomaticLevels
mode. If you set cnMinLevelValF only, a default spacing is used, and the value of cnMaxLevelValF is determined as it would be forAutomaticLevels
mode.ExplicitLevels
- This mode allows you to specify the value of each contour level by
explicitly setting the contents of the cnLevels array. If
you choose
ExplicitLevels
selection mode when creating a ContourPlot object, but do not specify the contents of the cnLevels array, ContourPlot will choose levels as if you had specifiedAutomaticLevels
mode. Thereafter, when you setExplicitLevels
mode, ContourPlot uses the current contents of cnLevels, whether or not you set it explicitly.If the number of elements in cnLevels exceeds the absolute maximum number of levels (currently 255), ContourPlot issues a warning and the mode defaults to
AutomaticLevels
. Note that ContourPlot always sorts the elements of cnLevels into a monotonically increasing sequence. After sorting, cnMinLevelValF is set equal to the value of first element of cnLevels, and cnMaxLevelValF is set to the value of the last element. cnLevelSpacingF is set to the average value of the spacing separating each level. EqualSpacedLevels
- For this mode, ContourPlot divides the range
spanning the dataset minimum and maximum values into
cnMaxLevelCount+1 equally spaced
intervals.
ContourPlot sets cnLevelSpacingF to the value of this interval, cnMinLevelValF to the dataset minimum plus the value of cnLevelSpacingF, and cnMaxLevelValF to the value of the dataset maximum minus the value of cnLevelSpacingF. You cannot set these three resources yourself.
ContourPlot also sets the read-only resource cnLevelCount equal to cnMaxLevelCount.
Default:
AutomaticLevels
- cnLevelSpacingF
-
When the cnLevelSelectionMode is
ManualLevels
or when the cnLevelSelectionMode isAutomaticLevels
, and cnLevelSpacingF is explicitly set, cnLevelSpacingF determines the spacing between contour intervals. Otherwise, the ContourPlot object sets the value of cnLevelSpacingF based on the contour levels actually chosen. When the cnLevelSelectionMode isExplicitLevels
, cnLevelSpacingF will be set to the arithmetic average of the spacing between levels.Default: 5.0
- cnLevels
-
An array of floats containing the contour levels used to render the
contour plot. If the cnLevelSelectionMode is
ExplicitLevels
, you may set these values yourself. Otherwise, the ContourPlot object sets the elements of this array.Default: <dynamic>
- cnLineColor
-
When cnMonoLineColor is set True, this resource of
type NhlTColorIndex or a
named color (string). sets a
uniform color for all contour lines.
Default:
Foreground
(1) - cnLineColors
-
The elements of this array of type NhlTColorIndexGenArray
can be set using an array of color indexes, an array of
named colors, or an array
of RGB
or RGBA values. If cnMonoFillColor
If cnMonoLineColor is
False
, each member of the array specifies the color of the contour line drawn at the corresponding contour level.Although backwards compatibility is for the most part maintained, beginning with version 6.1.0, this resource supports the new 32-bit color model, as follows:
If cnLineColors is not set explicitly, its values are derived from the settings of cnLinePalette and cnSpanLinePalette, or, if cnLinePalette is not set, wkColorMap and cnSpanLinePalette. If cnSpanLinePalette is
True
, the values are distributed evenly through the range of colors available from cnLinePalette or wkColorMap. Otherwise, the values are sequential. If the color indexes are derived from cnLinePalette the first color comes from element 0, whereas if they are derived from wkColorMap, the first color comes from element 2. This is because wkColorMap contains special elements (0 and 1) for theBackground
andForeground
colors, whereas the palette-type resources do not. If some but not all of the available elements of cnLineColors are explicitly set, the remaining elements will be determined as if cnSpanLinePalette has the valueFalse
.For backwards compatibility, colors set based on wkColorMap remain indexed to the current color map associated with the workstation. Consequently, if the workstation color map is changed prior to drawing the plot, the color indexes will map into the new color map. In contrast, color indexes derived from the cnLinePalette resource always refer to a specific color regardless of changes to wkColorMap.
Default: <dynamic>
- cnLineDashPattern
-
When cnMonoLineDashPattern is set True, this resource of type
NhlTDashIndex
sets a uniform
dash pattern for all contour lines.
Default:
SolidLine
(0) - cnLineDashPatterns
-
When cnMonoLineDashPattern is False, this array resource of
type
NhlTDashIndexGenArray
individually sets the
dash pattern of a contour line drawn at the corresponding contour
level. If the array is not set explicitly, the
ContourPlot object will assign sequential dash
pattern indexes to each array element--starting with dash pattern
index 1, not
"SolidLine"
(0)--up to the maximum number of existing dash patterns. Thereafter, it will repeat the sequence using modular arithmetic. If the array currently contains fewer elements than cnLevelCount, more elements will be added to the array and given values according to the same assignment scheme; existing elements with valid dash pattern index values will not be modified.Default: <dynamic>
- cnLineDashSegLenF
-
This resource indicates the length of each segment of the dash patterns
used to draw contour lines. It is the length in NDC
units before the dash pattern repeats itself. If
cnLineLabelPlacementMode is set to
Constant
the line labels are rendered as part of the dash pattern, and therefore cnLineDashSegLenF also controls the spacing between the line labels.cnLineDashSegLenF automatically scales with changes in the size of the viewport of the ContourPlot object. ContourPlot sets its default value dynamically based on the ratio of the actual plot viewport width to the reference viewport width.
Default: 0.15 (for a viewport width of 0.6)
- cnLineDrawOrder
-
This resource of type
NhlTDrawOrder determines
when the contour lines are drawn relative to other elements of the
plot. There are three choices:
PreDraw
- Draw the contour lines before the standard draw; the lines will be overlaid by any subsequently drawn elements.
Draw
- Draw the lines during the standard draw; the lines will overlay any elements drawn during the predraw phase, but will underlie elements drawn during the postdraw phase.
PostDraw
- Draw the lines after the standard draw; the lines will overlay any elements drawn during the predraw and draw phases.
Default:
Draw
- cnLineLabelAngleF
-
- When cnLineLabelAngleF has a value less than 0.0, ContourPlot line labels are angled in the direction of the tangent of the contour line at the location of the label. Otherwise, cnLineLabelAngleF specifies the angle, in degrees, of all contour line labels. If cnLineLabelPlacementMode is set to
Constant
, this resource has no effect: the line labels are always placed along the contour line.Default: -1.0
- When cnLineLabelAngleF has a value less than 0.0, ContourPlot line labels are angled in the direction of the tangent of the contour line at the location of the label. Otherwise, cnLineLabelAngleF specifies the angle, in degrees, of all contour line labels. If cnLineLabelPlacementMode is set to
- cnLineLabelBackgroundColor
-
- This resource sets the background color used to fill the box surrounding each line label. If you do not want the box to be filled at all, set cnLineLabelBackgroundColor to
Transparent
(-1). If cnLineLabelPlacementMode is set toConstant
, this resource has no effect: a boxed background is not available.You can use a color index value (integer) or a named color (string).
Default:
Background
(0) - This resource sets the background color used to fill the box surrounding each line label. If you do not want the box to be filled at all, set cnLineLabelBackgroundColor to
- cnLineLabelConstantSpacingF
-
- Normally when cnLineLabelFontQuality is set to
High
, the ContourPlot object writes line label text with proportional spacing. Setting the cnLineLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of cnLineLabelConstantSpacingF. When cnLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when cnLineLabelFontQuality is notHigh
. Values less than 0.0 result in an error and are replaced with the default value.Default: 0.0
- Normally when cnLineLabelFontQuality is set to
- cnLineLabelCount
-
- Each time a ContourPlot is drawn, the read-only resource cnLineLabelCount is updated with the number of line labels actually rendered in the plot. Until the plot is drawn for the first time cnLineLabelCount has the value 0;
Default: 0
- Each time a ContourPlot is drawn, the read-only resource cnLineLabelCount is updated with the number of line labels actually rendered in the plot. Until the plot is drawn for the first time cnLineLabelCount has the value 0;
- cnLineLabelDensityF
-
- The cnLineLabelDensityF resource provides simple, though not very precise, control over the number of line labels that appear in a contourplot. It has an effect only when cnLineLabelPlacementMode is set to
Computed
orRandomized
. cnLineDashSegLenF controls the density ofConstant
mode line labels..If cnLineLabelDensityF is set to its default value, 0.0, it has no effect and line label density can only be controlled by setting the appropriate low level parameters via the resource cnConpackParams. Setting cnLineLabelDensityF to 1.0 causes ContourPlot to use the default settings of the applicable low level resources, overriding any that are set through the cnConpackParams resource. Increase the number of line labels by setting cnLineLabelDensityF to values greater than 1.0, or decrease the number by setting it to positive values less than 1.0. You can obtain a count of the line labels drawn in the most recent rendering of the ContourPlot by retrieving the resource cnLineLabelCount.
Default: 0.0
- The cnLineLabelDensityF resource provides simple, though not very precise, control over the number of line labels that appear in a contourplot. It has an effect only when cnLineLabelPlacementMode is set to
- cnLineLabelFont
-
- This resource of type NhlTFont specifies the font used to render line labels.
Default: "pwritx"
- This resource of type NhlTFont specifies the font used to render line labels.
- cnLineLabelFontAspectF
-
- This resource determines the shape of the line label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
Default: 1.3125
- This resource determines the shape of the line label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
- cnLineLabelFontColor
-
- When cnMonoLineLabelFontColor is set True, this resource of type NhlTColorIndex or a named color (string) sets a uniform color for all contour line labels.
Default:
Foreground
(1) - When cnMonoLineLabelFontColor is set True, this resource of type NhlTColorIndex or a named color (string) sets a uniform color for all contour line labels.
- cnLineLabelFontColors
-
- When cnMonoLineLabelFontColor is False, each element of this array of type NhlTColorIndexGenArray or named color (string) specifies the color of a contour line label. If the array is not set explicitly, it will dynamically default to a set of colors spread numerically over the range of defined HLU color indexes. The colors used will therefore depend on the number of contour levels. If the array currently contains fewer elements than cnLevelCount, more elements will be added to the array and given values according to the default color assignment scheme; existing elements with valid color index values will not be modified.
You can use an array of color index values (integer) or named colors (string).
Default: <dynamic>
- When cnMonoLineLabelFontColor is False, each element of this array of type NhlTColorIndexGenArray or named color (string) specifies the color of a contour line label. If the array is not set explicitly, it will dynamically default to a set of colors spread numerically over the range of defined HLU color indexes. The colors used will therefore depend on the number of contour levels. If the array currently contains fewer elements than cnLevelCount, more elements will be added to the array and given values according to the default color assignment scheme; existing elements with valid color index values will not be modified.
- cnLineLabelFontHeightF
-
- This resource controls the height, in NDC units, of characters used in the text of line labels. The character width scales proportionally, unless you also modify the aspect ratio using the cnLineLabelFontAspectF resource. The line label text height scales with changes to the viewport width, unless you explicitly set cnLineLabelFontHeightF during the same call.
Default: <dynamic> -- 0.012 for a viewport width of 0.6
- This resource controls the height, in NDC units, of characters used in the text of line labels. The character width scales proportionally, unless you also modify the aspect ratio using the cnLineLabelFontAspectF resource. The line label text height scales with changes to the viewport width, unless you explicitly set cnLineLabelFontHeightF during the same call.
- cnLineLabelFontQuality
-
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot line labels.
Default:
High
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot line labels.
- cnLineLabelFontThicknessF
-
- Sets the thickness of the line used to draw line label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnLineLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
Default: 1.0
- Sets the thickness of the line used to draw line label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnLineLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
- cnLineLabelFormat
-
- The cnLineLabelFormat resource is a string that specifies the printing format for the numeric portion of line labels according to the HLU Floating Point Format Specification scheme. It does not apply when the user explicitly sets the elements of cnLineLabelStrings. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
Note that since the labels used for the ContourPlot LabelBar are copied from the cnLineLabelStrings resource the cnLineLabelFormat resource also controls the formatting of the LabelBar labels. This is true whether cnLineLabelsOn is set
True
orFalse
.Default: "*+^sg"
- The cnLineLabelFormat resource is a string that specifies the printing format for the numeric portion of line labels according to the HLU Floating Point Format Specification scheme. It does not apply when the user explicitly sets the elements of cnLineLabelStrings. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
- cnLineLabelFuncCode
-
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the label string.
Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.
Default: ~
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the label string.
- cnLineLabelInterval
-
When cnMonoLevelFlag is False and you do not explicitly set
the array cnLevelFlags, a positive value of
cnLineLabelInterval sets the number of levels from a labeled
level to the next labeled level. The interval is generated in both
directions from the contour level requiring the least number of
significant digits to express (with the value 0.0 considered to
require zero significant digits). If cnLineLabelInterval is
less than or equal to zero, then no contour levels are labeled.
Default: 2
- cnLineLabelPerimColor
-
- This resource sets the HLU color index used to draw the perimeter of the line label box. If cnLineLabelPlacementMode is set to
Constant
, this resource has no effect: no perimeter can be drawn around the label.You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the HLU color index used to draw the perimeter of the line label box. If cnLineLabelPlacementMode is set to
- cnLineLabelPerimOn
-
- cnLineLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour line labels. If set False, no outline will be drawn. If cnLineLabelPlacementMode is set to
Constant
, this resource has no effect: no perimeter can be drawn around the label.Default: True
- cnLineLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour line labels. If set False, no outline will be drawn. If cnLineLabelPlacementMode is set to
- cnLineLabelPerimSpaceF
-
- cnLineLabelPerimSpaceF determines the spacing or margin between the text of the line label and the edge of the line label box as a fraction of the current line label text height. If cnLineLabelPlacementMode is set to
Constant
, this resource has no effect: no perimeter can be drawn around the label.Default: 0.33
- cnLineLabelPerimSpaceF determines the spacing or margin between the text of the line label and the edge of the line label box as a fraction of the current line label text height. If cnLineLabelPlacementMode is set to
- cnLineLabelPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the line label box. The value acts as a multiplier of a (device-dependent) unit thickness. If cnLineLabelPlacementMode is set to
Constant
, this resource has no effect: no perimeter can be drawn around the label.Default: 1.0
- This resource determines the thickness of the perimeter line around the line label box. The value acts as a multiplier of a (device-dependent) unit thickness. If cnLineLabelPlacementMode is set to
- cnLineLabelPlacementMode
-
- This resource of type NhlTcnLineLabelPlacementMode determines the algorithm ContourPlot uses to place line labels. There are three choices:
Constant
- ContourPlot draws line labels as an integral part of the line dash pattern. As a result, the labels are equally spaced along the lines. You can control the spacing between the labels by setting the cnLineDashSegLenF resource.
Randomized
- ContourPlot places labels using a randomizing algorithm to vary the distance between labels. You can increase or decrease the overall number of labels using the cnLineLabelDensityF resource. Or for more precise control, you can specify the appropriate low level parameter values yourself using cnConpackParams.
Computed
- ContourPlot uses a more complex algorithm involving the local gradient, number of contour lines in a region, cumulative change in direction, and an optimum distance value to determine the best location for line labels. This method usually gives the best-looking results. You can increase or decrease the overall number of labels using the cnLineLabelDensityF resource. Or for more precise control, you can specify the appropriate low level parameter values yourself using cnConpackParams.
Default:
Randomized
- This resource of type NhlTcnLineLabelPlacementMode determines the algorithm ContourPlot uses to place line labels. There are three choices:
- cnLineLabelStrings
-
- Each element of the array resource cnLineLabelStrings specifies a string to be drawn at a contour level. Note that there is an element of this array for each contour level, whether or not (based on the contents of the cnLevelFlags array) a label will actually be drawn. If cnExplicitLineLabelsOn is set False, ContourPlot automatically sets the contents of the array to a set of strings representing the values of the contour levels, scaled based on the value of cnLabelScaleFactorF, and formatted based on the contents of cnMaxDataValueFormat and cnLineLabelFormat.
If cnExplicitLineLabelsOn is set True, ContourPlot will not modify any initialized element of the array, thus allowing you to set its values to strings of your choice. If you set the resource with an array containing fewer elements than the current number of levels, the remaining elements will be assigned using the automatic method.
Default: <dynamic>
- Each element of the array resource cnLineLabelStrings specifies a string to be drawn at a contour level. Note that there is an element of this array for each contour level, whether or not (based on the contents of the cnLevelFlags array) a label will actually be drawn. If cnExplicitLineLabelsOn is set False, ContourPlot automatically sets the contents of the array to a set of strings representing the values of the contour levels, scaled based on the value of cnLabelScaleFactorF, and formatted based on the contents of cnMaxDataValueFormat and cnLineLabelFormat.
-
- cnLineLabelsOn
-
- If this boolean resource is set False, contour line labels will not appear in the contour plot. Note that this resource overrides the values contained in the cnLevelFlags array resource with respect to line labels, but has nothing to do with whether contour lines appear.
Default: True (False for gsn_csm contour routines when contour fill is turned on.)
- If this boolean resource is set False, contour line labels will not appear in the contour plot. Note that this resource overrides the values contained in the cnLevelFlags array resource with respect to line labels, but has nothing to do with whether contour lines appear.
- cnLinePalette
-
Available in version 6.1.0 and later.
This resource of type NhlTColorDefinitionGenArray allows you to set a color palette from which the values assigned to cnLineColors are chosen.
You can set this resource to the string name of a predefined color map, an array of named colors, or an array of RGB or RGBA values. If you set cnLinePalette using a predefined color map, it will have two fewer elements than if you set wkColorMap using the same color map. This is because the wkColorMap resource contains special elements (0 and 1) for the
Background
andForeground
colors, whereas the palette-type resources do not. Use cnSpanLinePalette to indicate whether to span the full color palette or to simply use sequentially increasing values.Default:
None
- cnLineThicknessF
-
When cnMonoLineThickness is True, this resource sets a uniform
line thickness for all contour lines.
Default: 1.0
- cnLineThicknesses
-
If cnMonoLineThickness is False, each element of this array
resource specifies the line thickness of a contour line drawn at the
corresponding contour level. If the array is not set explicitly, all
elements default to the value 1.0. If the array currently contains
fewer elements than cnLevelCount, more elements will be added
to the array and set to the default value, 1.0; existing elements with
valid line thicknesses (greater than 0.0) will not be modified.
Default: 1.0 for all elements
- cnLinesOn
-
If this boolean resource is set False, no contour lines will appear
in the contour plot, regardless of the values contained in the
cnLevelFlags array resource. It has no effect on line labels.
Default: True (False for gsn_csm contour routines when contour fill is turned on.)
- cnLowLabelAngleF
-
- Due to constraints imposed by the low level utilities, the low label text angle cannot be set independently of the high label text angle. Therefore, this resource is currently ignored. Use cnHighLabelAngleF.
- Due to constraints imposed by the low level utilities, the low label text angle cannot be set independently of the high label text angle. Therefore, this resource is currently ignored. Use cnHighLabelAngleF.
- cnLowLabelBackgroundColor
-
- This resource sets the background color used to fill the box surrounding each low label. If you do not want the box to be filled at all, set cnLowLabelBackgroundColor to
Transparent
(-1).Default:
Background
(0) - This resource sets the background color used to fill the box surrounding each low label. If you do not want the box to be filled at all, set cnLowLabelBackgroundColor to
- cnLowLabelConstantSpacingF
-
- Normally when cnLineLabelFontQuality is set to
High
, the ContourPlot object writes line label text with proportional spacing. Setting the cnLineLabelConstantSpacingF to a value greater than 0.0 overrides this behavior. Instead, the distance from the start of one character to the next is computed by multiplying a single standard character width by the value of cnLineLabelConstantSpacingF. When cnLineLabelConstantSpacingF has a value between 0.0 and 1.0, characters will overlap. A value of 1.0 implies, on average, no space between characters, while values increasing from 1.0 cause the space between characters to grow. This parameter is ignored when cnLineLabelFontQuality is notHigh
. Values less than 0.0 result in an error and are replaced with the default value.Default: 0.0
- Normally when cnLineLabelFontQuality is set to
- cnLowLabelCount
-
- Each time a ContourPlot is drawn, the read-only resource cnLowLabelCount is updated with the number of low labels actually rendered in the plot. Until the plot is drawn for the first time cnLowLabelCount has the value 0;
Default: 0
- Each time a ContourPlot is drawn, the read-only resource cnLowLabelCount is updated with the number of low labels actually rendered in the plot. Until the plot is drawn for the first time cnLowLabelCount has the value 0;
- cnLowLabelFont
-
- This resource of type NhlTFont specifies the font used to render low labels.
Default: "pwritx"
- This resource of type NhlTFont specifies the font used to render low labels.
- cnLowLabelFontAspectF
-
- This resource determines the shape of the low label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
Default: 1.3125
- This resource determines the shape of the low label characters. Values increasing from 1.0 result in thinner characters. Values decreasing from 1.0 make the characters wider. Values less than or equal to 0.0 result in a WARNING message and a restoration of the default value.
- cnLowLabelFontColor
-
- This resource specifies the HLU color index used to render low label text.
Default:
Foreground
(1) - This resource specifies the HLU color index used to render low label text.
- cnLowLabelFontHeightF
-
- Due to constraints imposed by the low level utilities, the low label font height cannot be set independently of the high label font height. Therefore, this resource is currently ignored. Use cnHighLabelFontHeightF.
- Due to constraints imposed by the low level utilities, the low label font height cannot be set independently of the high label font height. Therefore, this resource is currently ignored. Use cnHighLabelFontHeightF.
- cnLowLabelFontQuality
-
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot low labels.
Default:
High
- This resource of type NhlTFontQuality determines the quality of the font used to draw ContourPlot low labels.
- cnLowLabelFontThicknessF
-
- Sets the thickness of the line used to draw low label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnLowLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
Default: 1.0
- Sets the thickness of the line used to draw low label text. The value acts as a multiplier of a (device-dependent) unit thickness. This resource is ignored when the cnLowLabelFont specifies a filled font (font indexes 21-22, 25-26, 29-30, and 33-37).
- cnLowLabelFormat
-
- The cnLowLabelFormat resource is a string that specifies the printing format for the numeric portion of low labels according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
Default: "*+^sg"
- The cnLowLabelFormat resource is a string that specifies the printing format for the numeric portion of low labels according to the HLU Floating Point Format Specification scheme. If any of the numerical format parameters have the dynamic attribute on, the corresponding parameter in the cnMaxDataValueFormat resource determines the parameter's value. The default value uses the shorthand notation '*+' to cause all numeric format parameters to be determined dynamically.
- cnLowLabelFuncCode
-
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the low label string.
Note: the default function code was a colon (:) in NCL Versions 6.0.0 and earlier.
Default: ~
- This resource of type NhlTCharacter sets the function code character that the low level utilities will use when parsing the low label string.
- cnLowLabelPerimColor
-
- This resource sets the color to use to draw the perimeter of the low label box.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use to draw the perimeter of the low label box.
- cnLowLabelPerimOn
-
- cnLowLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour low labels. If set False, no outline will be drawn.
Default: True
- cnLowLabelPerimOn is a boolean resource that determines whether ContourPlot will draw an outline around the perimeter of the box surrounding contour low labels. If set False, no outline will be drawn.
- cnLowLabelPerimSpaceF
-
- cnLowLabelPerimSpaceF determines the spacing or margin between the text of the low label and the edge of the low label box as a fraction of the current low label text height.
Default: 0.33
- cnLowLabelPerimSpaceF determines the spacing or margin between the text of the low label and the edge of the low label box as a fraction of the current low label text height.
- cnLowLabelPerimThicknessF
-
- This resource determines the thickness of the perimeter line around the low label box. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of the perimeter line around the low label box. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnLowLabelString
-
- Specifies the string to use when drawing low labels. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring "$ZDV$" with a number representing the value at the point where the label is to appear. cnLowLabelFormat determines the format of the number and cnLabelScaleFactorF determines the scaling of the actual data value.
Default: "L~B~$ZDV$~E~"
- Specifies the string to use when drawing low labels. The string may contain function codes and/or substitution substrings. ContourPlot will replace the substring "$ZDV$" with a number representing the value at the point where the label is to appear. cnLowLabelFormat determines the format of the number and cnLabelScaleFactorF determines the scaling of the actual data value.
- cnLowLabelsOn
-
- If this boolean resource is set True, ContourPlot places labels at regions representing local minimums in the dataset.
Default: True
- If this boolean resource is set True, ContourPlot places labels at regions representing local minimums in the dataset.
- cnLowUseHighLabelRes
-
If the boolean resource cnLowUseHighLabelRes is set
True, all resources applying to low labels, except for
cnLowLabelString, take their value from the
corresponding high label resources. Note that, due to constraints
imposed by the low level utilities, there are two low label
attributes, font height and text angle, that are always controlled by
the relevant high label resource, even when
cnLowUseHighLabelRes is set False. In other words,
although the resouces cnLowLabelAngleF and
cnLowLabelFontHeightF exist, they are currently
ignored.
Default: False
- cnMaxDataValueFormat
-
- The cnMaxDataValueFormat resource is a string that specifies the printing format for the maximum data value according to the HLU Floating Point Format Specification scheme. This resource serves as a master control for formatting any number representing ScalarField data when used in a ContourPlot label. If the format string for a label type sets the dynamic attribute for any of its numerical format parameters, the parameter's value is determined by the value of the corresponding parameter in the cnMaxDataValueFormat specifier. Thus, you can control the numerical format parameters for all labels by adjusting a single resource. For some format parameters, notably the leftmost significant digit parameter, you must use the dynamic attribute in order to apply the parameter in a meaningful way.
Default: "*+.4^sg"
- The cnMaxDataValueFormat resource is a string that specifies the printing format for the maximum data value according to the HLU Floating Point Format Specification scheme. This resource serves as a master control for formatting any number representing ScalarField data when used in a ContourPlot label. If the format string for a label type sets the dynamic attribute for any of its numerical format parameters, the parameter's value is determined by the value of the corresponding parameter in the cnMaxDataValueFormat specifier. Thus, you can control the numerical format parameters for all labels by adjusting a single resource. For some format parameters, notably the leftmost significant digit parameter, you must use the dynamic attribute in order to apply the parameter in a meaningful way.
- cnMaxLevelCount
-
When the cnLevelSelectionMode is
AutomaticLevels
and cnLevelSpacingF is not explicitly set, ContourPlot picks a number of levels less than or equal to the current value of cnMaxLevelCount. If the cnLevelSelectionMode isEqualSpacedLevels
, ContourPlot picks exactly cnMaxLevelCount levels. If cnMaxLevelCount exceeds the absolute maximum level count allowed by ContourPlot (currently 255), a warning is issued and the value is reset to this maximum. If cnLevelSelectionMode isManualLevels
orExplicitLevels
orAutomaticLevels
with cnLevelSpacingF explicitly set, ContourPlot sets cnMaxLevelCount to the number of levels actually used if this number is greater than the current value of cnMaxLevelCount.Default: 16
- cnMaxLevelValF
-
When the cnLevelSelectionMode is
ManualLevels
, the value of cnMaxLevelValF, if set, determines the highest contour level. Otherwise, ContourPlot sets the cnMaxLevelValF to a value equal to the highest contour level picked.Default: <dynamic>
- cnMaxPointDistanceF
-
- Controls the maximum distance along both the width and height of the viewport allowed before checking for a discontinuous jump in the mapped coordinate points. The value specifies a fraction of the view width for the width check and a fraction of the view height for the height check. A value of 0.0 for this resource turns off this form of checking altogether. When non-zero, this value should not be set less than 0.001 or greater than 0.1. Smaller values increase processing time.
Note that if cnGridBoundFillColor is set to anything other than its default of
Transparent
and cnGridBoundFillPattern is set to anything other thanHollowFill
, cnMaxPointDistanceF is ignored. The underlying parameter it normally controls is constrained to the value 0.001. This is because the grid boundary needs to be calculated more precisely in this instance in order to correctly generate the fill areas on each side of the grid boundary.Default: 0.05
- Controls the maximum distance along both the width and height of the viewport allowed before checking for a discontinuous jump in the mapped coordinate points. The value specifies a fraction of the view width for the width check and a fraction of the view height for the height check. A value of 0.0 for this resource turns off this form of checking altogether. When non-zero, this value should not be set less than 0.001 or greater than 0.1. Smaller values increase processing time.
- cnMinLevelValF
-
When the cnLevelSelectionMode is
ManualLevels
, the value of cnMinLevelValF, if set, determines the lowest contour level. Otherwise, ContourPlot sets the cnMinLevelValF to a value equal to the lowest contour level picked.Default: <dynamic>
- cnMissingValFillColor
-
- This resource sets the color to use for filling in missing value areas. cnFillOn must be set to True and cnMissingValFillPattern must have a value other than
HollowFill
(-1) for this resource to have an effect.You can use a color index value (integer) or a named color (string).
Prior to version 6.2.0, if cnFillMode was set to
RasterFill
, theBackground
color was substituted ifTransparent
was specified for cnMissingValFillColor.Also note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set to
TriangularMesh
, the color index used will be the larger value of those assigned to the resources cnMissingValFillColor and cnGridBoundFillColor.Default:
Transparent
(-1) (Background
prior to version 6.0.0) - This resource sets the color to use for filling in missing value areas. cnFillOn must be set to True and cnMissingValFillPattern must have a value other than
- cnMissingValFillPattern
-
- This resource sets the fill pattern index used to fill missing value areas. cnFillOn must be set to True and cnMissingValFillColor must have a value other than
Transparent
(-1) for this resource to have an effect. If cnFillMode is set toRasterFill
orCellFil
onlySolidFill
is possible.Note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set to
TriangularMesh
, the fill index used will be the larger value of those assigned to the resources cnMissingValFillPattern and cnGridBoundFillPattern.Default:
SolidFill
(HollowFill
prior to version 6.0.0) - This resource sets the fill pattern index used to fill missing value areas. cnFillOn must be set to True and cnMissingValFillColor must have a value other than
- cnMissingValFillScaleF
-
- The cnMissingValFillScaleF resource controls the scaling of the pattern used for missing values fill areas. It has no effect for solid fill (fill pattern index
Solid
or 0) or whenever fill patterns are not enabled. Values greater than 1.0 make the pattern spacing bigger than the default spacing, resulting in a fill that appears less dense. Values less than 1.0 have the opposite effect. Values less than or equal to 0.0 are invalid, generate a warning message, and are reset to the default value, 1.0.Note that the triangular mesh contouring algorithm does not distinguish between missing value areas and areas outside the grid boundary. Therefore if ContourPlot is given non-rectangular data or trGridType is explicitly set to
TriangularMesh
, the fill scale used will be the value assigned to cnMissingValFillScaleF unless it is set to the default value, 1.0. In that case it will be the value assigned to cnGridBoundFillScaleF.Default: 1.0
- The cnMissingValFillScaleF resource controls the scaling of the pattern used for missing values fill areas. It has no effect for solid fill (fill pattern index
- cnMissingValPerimColor
-
- This resource sets the color to use for drawing perimeter lines around missing value areas.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use for drawing perimeter lines around missing value areas.
- cnMissingValPerimDashPattern
-
- This resource sets the HLU index of a dash pattern used to render perimeter lines around missing value areas.
Default: 0
- This resource sets the HLU index of a dash pattern used to render perimeter lines around missing value areas.
- cnMissingValPerimGridBoundOn
-
- If cnMissingValPerimOn is set True, then setting cnMissingValPerimGridBoundOn True causes complete perimeter lines to be drawn around the missing value areas, including along all edges of the data grid. When set False, missing value perimeter lines that coincide with the data grid edge are not drawn.
If cnMissingValPerimOn is set False, this resource has no effect.
Default: False
- If cnMissingValPerimOn is set True, then setting cnMissingValPerimGridBoundOn True causes complete perimeter lines to be drawn around the missing value areas, including along all edges of the data grid. When set False, missing value perimeter lines that coincide with the data grid edge are not drawn.
- cnMissingValPerimOn
-
- If set True, this boolean resource specifies that perimeter lines be drawn around missing value areas in the ContourPlot object. Unless cnMissingValPerimGridBoundOn is also set True, the portions of the missing value perimeter lines that overlap the data grid boundary are not drawn.
Default: False
- If set True, this boolean resource specifies that perimeter lines be drawn around missing value areas in the ContourPlot object. Unless cnMissingValPerimGridBoundOn is also set True, the portions of the missing value perimeter lines that overlap the data grid boundary are not drawn.
- cnMissingValPerimThicknessF
-
- This resource determines the thickness of perimeter lines around missing value areas. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of perimeter lines around missing value areas. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnMonoFillColor
-
When set True, all contour fill areas are set to a single
color, as specified by the value of the scalar resource cnFillColor.
When False, the elements of the array resource cnFillColors
control the color of each fill area individually.
Default: False
- cnMonoFillPattern
-
When set True, all contour fill areas use a single
fill pattern, as specified by the
value of the scalar resource cnFillPattern. When False, the
elements of the array resource cnFillPatterns control the
pattern used for each fill area individually.
Default: True
- cnMonoFillScale
-
When set True, all contour fill patterns are scaled by a single
factor, as specified by the value of the scalar resource
cnFillScaleF. When False, the elements of the array resource
cnFillScales control the scaling applied to the fill pattern
assigned to each fill area individually.
Default: True
- cnMonoLevelFlag
-
When cnMonoLevelFlag is set True, the scalar resource
cnLevelFlag sets the level flag controlling the appearance
of the line and/or the line label to a single value. In this case, the
cnLineLabelInterval resource has no effect. Otherwise, when
cnMonoLevelFlag is set False, you can set the level flag for
each line individually using the resource cnLevelFlags, or
set line labels to appear at uniform contour intervals using the
resource cnLineLabelInterval.
Default: False
- cnMonoLineColor
-
When set True, all contour lines are set to a single
color, as specified by the value of the scalar resource cnLineColor.
Otherwise, the elements of the array resource cnLineColors
control the color of each line individually.
Default: True
- cnMonoLineDashPattern
-
When set True, all contour lines are rendered using the same
dash pattern, as specified by the
value of the scalar resource cnLineDashPattern. Otherwise,
the elements of the array resource cnLineDashPatterns control
the dash pattern of each line individually.
Default: True
- cnMonoLineLabelFontColor
-
- When set True, all contour line labels are rendered using a single color, as specified by the value of the scalar resource cnLineLabelFontColor. When False, the elements of the array resource cnLineLabelFontColors control the color of each line label individually.
Default: True
- When set True, all contour line labels are rendered using a single color, as specified by the value of the scalar resource cnLineLabelFontColor. When False, the elements of the array resource cnLineLabelFontColors control the color of each line label individually.
- cnMonoLineThickness
-
When set True, all contour lines are rendered using the same line
thickness, as specified by the value of the scalar resource
cnLineThicknessF. Otherwise, the elements of the array
resource cnLineThicknesses control the thickness of each line
individually.
Default: True
- cnNoDataLabelOn
-
- This boolean resource, when set True, causes a label to appear when ContourPlot is drawn without any data having been provided. Except for the label string, all attributes of this label, including its position, are set using resources belonging to the constant field label. When set False, no such label appears.
Default: True
- This boolean resource, when set True, causes a label to appear when ContourPlot is drawn without any data having been provided. Except for the label string, all attributes of this label, including its position, are set using resources belonging to the constant field label. When set False, no such label appears.
- cnNoDataLabelString
-
- This resource contains the string that appears in the 'No Data' label if you draw a ContourPlot object without providing any data. No substitution substrings are allowed in this label, since all the substitutions depend on data being available. Except for the boolean switch that turns it on and off, all attributes of this label, including its position, are set using resources belonging to the constant field label.
Default: "NO CONTOUR DATA"
- This resource contains the string that appears in the 'No Data' label if you draw a ContourPlot object without providing any data. No substitution substrings are allowed in this label, since all the substitutions depend on data being available. Except for the boolean switch that turns it on and off, all attributes of this label, including its position, are set using resources belonging to the constant field label.
- cnOutOfRangeFillColor
-
- Available in version 6.0.0 and later.
This resource sets the color to use for filling areas within the viewport but outside the projectable area of the underlying map, if any. cnFillOn must be set to True and cnOutOfRangeFillPattern must have a value other than
HollowFill
(-1) for this resource to have an effect.You can use a color index value (integer) or a named color (string).
Prior to version 6.2.0, if cnFillMode was set to
RasterFill
, theBackground
color was substituted ifTransparent
was specified for cnOutOfRangeFillColor. This resource is not supported for cnFillMode set toCellFill
.Default:
Transparent
(0) - Available in version 6.0.0 and later.
- cnOutOfRangeFillPattern
-
- Available in version 6.0.0 and later.
This resource sets the fill pattern index used to fill areas within the viewport but outside the projectable area of the underlying map, if any. cnFillOn must be set to True, and cnOutOfRangeFillColor must have a value other than
Transparent
(-1) for this resource to have an effect.If cnFillMode is set to
RasterFill
onlySolidFill
is possible. This resource is not supported for cnFillMode set toCellFill
.Default:
SolidFill
- Available in version 6.0.0 and later.
- cnOutOfRangeFillScaleF
-
- Available in version 6.0.0 and later.
The cnOutOfRangeFillScaleF resource controls the scaling of the pattern used for areas within the viewport but outside the projectable area of the underlying map, if any. It has no effect for solid fill (fill pattern index
Solid
or 0) or whenever fill patterns are not enabled. Values greater than 1.0 make the pattern spacing bigger than the default spacing, resulting in a fill that appears less dense. Values less than 1.0 have the opposite effect. Values less than or equal to 0.0 are invalid, generate a warning message, and are reset to the default value, 1.0.This resource is not supported for cnFillMode set to
CellFill
.Default: 1.0
- Available in version 6.0.0 and later.
- cnOutOfRangePerimColor
-
- This resource sets the color to use for drawing the perimeter lines around the edge of out-of-range areas.
You can use a color index value (integer) or a named color (string).
Default:
Foreground
(1) - This resource sets the color to use for drawing the perimeter lines around the edge of out-of-range areas.
- cnOutOfRangePerimDashPattern
-
- This resource sets the HLU index of a dash pattern used to render perimeter lines around the edge of out-of-range areas.
Default: 0
- This resource sets the HLU index of a dash pattern used to render perimeter lines around the edge of out-of-range areas.
- cnOutOfRangePerimOn
-
- If set True, this boolean resource specifies that perimeter lines be drawn around areas where the ScalarField data falls outside the current data boundaries of the plot.
Default: False
- If set True, this boolean resource specifies that perimeter lines be drawn around areas where the ScalarField data falls outside the current data boundaries of the plot.
- cnOutOfRangePerimThicknessF
-
- This resource determines the thickness of perimeter lines around the edge of out-of-range areas. The value acts as a multiplier of a (device-dependent) unit thickness.
Default: 1.0
- This resource determines the thickness of perimeter lines around the edge of out-of-range areas. The value acts as a multiplier of a (device-dependent) unit thickness.
- cnRasterCellSizeF
-
If this resource is explicitly set to a value greater than 0.0, it
specifies the height and width of each cell of the raster array in
NDC units. The number of cells in the raster array is determined by
how many cells of the specified size it takes to cover a rectangular
area bounding the data grid. In this case, the number of elements in
the data grid, the resolution of the Workstation
output device, and the setting of cnRasterSampleFactorF have
no effect on the size of the raster cell array.
No limit is placed on how small you may set this resource; it is not affected by the value of cnRasterMinCellSizeF. However, note that halving its size quadruples the overall number of cells in raster array, with consequent effects on processing time and memory usage. Once set, the value of this resource scales proportionally to changes in the viewport width, ensuring the same relative quality of output and processing time for any plot size.
Giving cnRasterCellSizeF a value less than or equal to 0.0 has the effect of 'unsetting' the resource, restoring the default method of sizing the raster cell array based on the device resolution, the size of the data array, and the values of the resources cnRasterMinCellSizeF and cnRasterSampleFactorF.
Even when unset, you may retrieve the value of this resource after a draw operation to find the minimum dimension of the cells in NDC units that was actually used to draw the plot.
Default: <dynamic>
- cnRasterMinCellSizeF
-
This resource supplies a lower limit for the size of a raster cell
whenever ContourPlot determines the cell array
density dynamically. It applies in all situations except when you set
the cell size explicitly using cnRasterCellSizeF or you
set cnRasterSampleFactorF to 0.0. It prevents
the cell array from becoming unreasonably large when drawing a raster
plot on a high-resolution workstation such as the
PSWorkstation. Set it to a smaller value if you
actually require plots at higher resolution. However, note that there
is an inverse quadratic relationship between the value of this resource
and the size of the cell array, with consequent effects on storage
requirements and processing time. You can use a larger value if you want quick
plots where detail is not so important.
Default: 0.001
- cnRasterModeOn
-
The cnRasterModeOn resource is deprecated in favor of
the newer cnFillMode resource (you must set
cnFillOn to True if you use
cnFillMode). As long as cnFillMode is
not set at the same time, it will continue to function as documented
here, but eventually the documentation will be removed.
If this boolean resource is set True, ContourPlot generates a representation of the data by individually assigning colors to the elements of a two-dimensional array of rectangular cells superimposed on an area bounding the data grid. This contrasts with the area fill method, in which a plot is generated by coloring the irregular areas formed by the boundaries of the lines defining adjacent contour levels. When raster mode is in effect, only solid fill is possible, and therefore the following resources have no effect:
- cnFillBackgroundColor
- cnMonoFillColor
- cnFillColor
- cnMonoFillPattern
- cnFillPattern
- cnFillPatterns
- cnFillDotSizeF
- cnMonoFillScale
- cnFillScaleF
- cnFillScales
- cnGridBoundFillPattern
- cnGridBoundFillScaleF
- cnMissingValFillPattern
- cnMissingValFillScaleF
- cnOutOfRangeFillPattern
- cnOutOfRangeFillScaleF
Background
color was substituted ifTransparent
was specified for any of these resources when raster mode was in effect.In general, within the limits of the Workstation output device resolution, the quality of a raster plot improves as the density of the cell array is increased. However, processing time and memory requirements also increase.
Default: False
- cnRasterSampleFactorF
-
If cnRasterCellSizeF is not explicitly set,
ContourPlot adjusts the raster cell size dynamically
in order to create a plot with as much resolution as is necessary
and/or practical, while simultaneously trying to keep the cell array
as small as possible. The default minimum cell size is the
workstation device pixel size or the value of
cnRasterMinCellSizeF, whichever is
bigger. ContourPlot uses this minimum size as the
default dynamic size whenever cnRasterSmoothingOn is True.
If cnRasterSmoothingOn is False, ContourPlot uses a larger default size if there is a linear mapping from data to NDC space and if the data grid has a lower resolution than a grid of minimum-sized cells would have. Linearity is considered separately along each axis: if the plot has one log axis and one linear axis, for example, rectangular cells may be created with the dimension along the log axis set to the minimum size while the linear dimension has a much larger size. If the plot is overlaid on a map projection, cells are set to the minimum size except for the special case of a non-rotated cylindrical equidistant projection with the center latitude set to 0.0.
Based on the dynamically determined default cell size and the NDC width and height of the data extent, ContourPlot calculates the number of cells needed along each dimension of the cell array. The cnRasterSampleFactorF resource acts as a multiplier of the number of raster cells along each dimension. Setting it to 2.0, for example, would double the number of cells along each axis, quadrupuling the overall size of the cell array. However, if this operation would result in the cells falling below the minimum size specified by cnRasterMinCellSizeF, their number is limited as required along the affected dimension. You can set cnRasterSampleFactorF to a value less than 1.0 in order improve plotting speed; the tradeoff will be diminished plot quality.
As a special case, if cnRasterSampleFactorF is set to 0.0, ContourPlot creates the cell array the same size as the data array, resulting in a one-to-one correspondence between data grid points and cells in the raster array. This is regardless of the Workstation device resolution or the setting of cnRasterMinCellSizeF.
Default: 1.0
- cnRasterSmoothingOn
-
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, 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.
The effect of this resource on the appearance of the plot depends on the density of the data relative to the number of cells in the raster array as limited by the resolution of the Workstation output device. If the data grid is more densely spaced than the cell array, two plots generated with opposite settings of this resource will appear qualitatively similar, although there may be differences of detail. However, if the data grid is sparse relative to the cell array density, turning smoothing off results in a plot that appears blocky and discontinuous compared to a plot drawn with smoothing turned on.
Default: False
- cnScalarFieldData
-
Specifies the id of a data object belonging to the
ScalarField class or its subclass
MeshScalarField.
There is no default for this resource; it is the only resource
that must be set for the ContourPlot object to
draw a plot. You may create a ContourPlot object
without setting the cnScalarFieldData, and auxiliary
annotations such as tick marks and titles may appear as the result of a
draw, but the ContourPlot itself will not show up.
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 object 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.
Default: <None>
- cnSmoothingDistanceF
-
- When the boolean resource cnSmoothingOn is set to True (it is False by default), the ContourPlot object will use cnSmoothingDistanceF to help control the parameters of the smoothing algorithm. cnSmoothingDistanceF sets the distance between points used to draw smoothed contour lines. It is expressed as a fraction of the width of the window in the coordinate system in which smoothing is being performed. Note that processing time is affected greatly by the value given to the smoothing distance. Smaller values add to the processing time.
Default: 0.01
- When the boolean resource cnSmoothingOn is set to True (it is False by default), the ContourPlot object will use cnSmoothingDistanceF to help control the parameters of the smoothing algorithm. cnSmoothingDistanceF sets the distance between points used to draw smoothed contour lines. It is expressed as a fraction of the width of the window in the coordinate system in which smoothing is being performed. Note that processing time is affected greatly by the value given to the smoothing distance. Smaller values add to the processing time.
- cnSmoothingOn
-
- When the boolean resource cnSmoothingOn is True, the ContourPlot object will smooth the contours using cubic splines under tension. The resources cnSmoothingTensionF and cnSmoothingDistanceF control the parameters of the smoothing algorithm. Note that when smoothing is turned on, it is possible in some cases for adjacent contour lines to cross each other. In this case, you need to adjust the cnSmoothingTensionF experimentally in order to eliminate the problem.
Default: False
- When the boolean resource cnSmoothingOn is True, the ContourPlot object will smooth the contours using cubic splines under tension. The resources cnSmoothingTensionF and cnSmoothingDistanceF control the parameters of the smoothing algorithm. Note that when smoothing is turned on, it is possible in some cases for adjacent contour lines to cross each other. In this case, you need to adjust the cnSmoothingTensionF experimentally in order to eliminate the problem.
- cnSmoothingTensionF
-
- When the boolean resource cnSmoothingOn is set to True (it is False by default), the ContourPlot object will use cnSmoothingTensionF to help control the parameters of the smoothing algorithm. If you give cnSmoothingTensionF a value of 0.0, smoothing is turned off. If you give it a negative value, the ContourPlot object performs smoothing prior to any transformations of the data space; if you make it positive, smoothing takes place after any data space transformations. Small absolute values on the order of 0.001 give 'loopy' curves, which are rather likely to cross each other. Large absolute values give tight, nearly polygonal curves.
Default: -2.5
- When the boolean resource cnSmoothingOn is set to True (it is False by default), the ContourPlot object will use cnSmoothingTensionF to help control the parameters of the smoothing algorithm. If you give cnSmoothingTensionF a value of 0.0, smoothing is turned off. If you give it a negative value, the ContourPlot object performs smoothing prior to any transformations of the data space; if you make it positive, smoothing takes place after any data space transformations. Small absolute values on the order of 0.001 give 'loopy' curves, which are rather likely to cross each other. Large absolute values give tight, nearly polygonal curves.
- cnSpanFillPalette
-
Available in version 6.1.0 and later.
If set to True, and if cnFillColors is not set using explicit values, then ContourPlot automatically spans the cnFillPalette resource to determine color index values for cnFillColors. If cnFillPalette is not set then the wkColorMap resource is spanned instead. If set to False, then ContourPlot uses consecutively ascending values to populate cnFillColors.
If the colors are derived from cnFillPalette the first color will be determined from element 0, whereas if they are derived from wkColorMap, the first color will come from element 2. This is because wkColorMap contains special elements (0 and 1) for the
Background
andForeground
colors, whereas the palette-type resources do not.Default: True
- cnSpanLinePalette
-
Available in version 6.1.0 and later.
If set to True, and if cnLineColors is not set using explicit values, then ContourPlot automatically spans the cnLinePalette resource to determine color index values for cnLineColors. If cnLinePalette is not set then the wkColorMap resource is spanned instead. If set to False, then ContourPlot uses consecutively ascending values to populate cnLineColors.
If the color indexes are derived from cnLinePalette the first color will be determeined from element 0, whereas if they are derived from wkColorMap, the first color comes from element 2. This is because wkColorMap contains special elements (0 and 1) for the
Background
andForeground
colors, whereas the palette-type resources do not.Default: True