NCL Website header
NCL Home > Documentation > Graphics > Resources

Transformation, IrregularTransformation, LogLinTransformation (tr) Resources

trGridType (Transformation)
This resource of type NhlTGridType directly correlates with the Transformation subclass used to map a plot object's data into its coordinate space. By default the Transformation is predetermined based on the plot object type and the form of the data that is sent to it. However, for the ContourPlot object, you can choose to use the TriangularMeshTransformation to plot any kind of data, or if ScalarField or VectorField data has 2D coordinate arrays, you can pick from as many as three Transformation subclasses. In these cases there is not a simple test that can automatically determine the most suitable class to use.

trGridType has five possible values:

Map
Specifies the MapTransformation.
LogLin
Specifies the LogLinTransformation.
Irregular
Specifies the IrregularTransformation.
Curvilinear
Specifies the CurvilinearTransformation.
Spherical
Specifies the SphericalTransformation.
TriangularMesh
Specifies the TriangularMeshTransformation.

trGridType is for the most part a read-only resource, except when the data grid is defined using 2D coordinate arrays or in the case of the ContourPlot whenever TriangularMesh is specified. When 2D coordinates are in effect, trGridType defaults to Spherical but you may set it Curvilinear or TriangularMesh if the plot class supports it. For a ContourPlot you may specify TriangularMesh for any type of data grid.

This resource may be intercepted or disabled by:

Default: <dynamic>

trLineInterpolationOn (Transformation)
This resource controls the rendering of the lines between defined points for XyPlot and for graphics primitives drawn using NhlDataPolyline or NhlDataPolygon. If set False, lines between the points are drawn as straight lines in NDC space. If set True, points are interpolated between the defined points in order to map the line into the data space.

This resource is disabled by:

V4.1.1 Status Note 1

Default: False

trXAxisType (IrregularTransformation)
This resource of type NhlTAxisType sets the type of transformation used for the X Axis. It has three possible settings:
IrregularAxis
Based on the values of the trXCoordPoints resource (and possibly the trXInterPoints resource), an irregular coordinate system is defined along the X Axis. If trXCoordPoints is unset or found to be invalid, a warning will be issued and trXAxisType will be reset to its default value: LinearAxis.
LogAxis
A logarithmic coordinate system is established for the X Axis with boundaries defined by the values of trXMinF and trXMaxF. If trXMinF is less than or equal to 0.0, a warning will be issued and trXAxisType will be reset to its default value: LinearAxis.
LinearAxis
A linear coordinate system is established for the X Axis with boundaries defined by the values of trXMinF and trXMaxF.

This resource may be intercepted or disabled by:

Default: LinearAxis

trXCoordPoints (IrregularTransformation)
If trXInterPoints is not set, this array resource represents uniformly spaced samples of a bounded irregularly spaced data coordinate system along the X Axis. The elements of the array must be arranged in a monotonically increasing or decreasing order. The coordinate system bounds are defined as the values of the minimum and maximum elements of the array: in other words, its first and last elements. If you superimpose on this coordinate system a regular coordinate system such that the left end is 0 and the right end is the number of elements in the array minus 1, then each succeeding array element value represents the coordinate value of the irregular coordinate system at successive integral coordinate points (0, 1, 2, ...) of the overlaid regular coordinate system. Note that these integral coordinates correspond directly to the array element index (with an offset of 1 when using a Fortran interface). Based on this mapping, the IrregularTransformation sets up both a forward and a reverse transformation.

trXCoordPoints is ignored unless trXAxisType is set to IrregularAxis. If the array contains less than two points or is non-monotonic, a warning will be issued and trXAxisType will be reset to its default value: LinearAxis.

V4.1 Status Note 2

This resource may be intercepted or disabled by:

Default: NULL

trXInterPoints (IrregularTransformation)
This array resource, which, if set, must contain the same number of points as trXCoordPoints, adds another step to the mapping from regular to irregular coordinates. As in the case when trXInterPoints is not set, you superimpose a bounded regular coordinate system on the irregular coordinate system. Successive elements of trXInterPoints, like those of trXCoordPoints, must increase or decrease monotonically. However, the element values have a range defined by the bounds of the superimposed regular coordinate system (0 through array size - 1). Now the location of the data coordinate point specified by each successive element of the trXCoordPoints is determined, not by direct correlation with its array index, but by the value of the corresponding element of the trXInterPoints array.

trXInterPoints is ignored unless trXAxisType is set to IrregularAxis. If trXInterPoints is found to be invalid, IrregularTransformation issues a warning message and computes the coordinate transformation as if it had not been set.

This resource may be intercepted or disabled by:

Default: NULL

trXLog (LogLinTransformation)
If this boolean resource is True, the X-Axis coordinate system is logarithmic; otherwise it is linear. When this value is set True, both trXMinF and trXMaxF are required to be greater than 0.0.

This resource may be intercepted or disabled by:

Default: False

trXMaxF (Transformation)
Specifies a maximum X coordinate value that defines the upper bound of the X-Axis coordinate system. If trXMaxF is less than trXMinF, the values will be exchanged before they are used to establish coordinate boundaries. If the axis is irregular, trXMaxF is constrained to lie within the bounds of the irregular coordinate system as established by the X-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: 1.0

trXMinF (Transformation)
Specifies a minimum X coordinate value that defines the lower bound of the X-Axis coordinate system. If trXMinF is greater than trXMaxF, the values will be exchanged before they are used to establish coordinate boundaries. If the axis is logarithmic, trXMinF must be greater than 0.0. If the axis is irregular, trXMinF is constrained to lie within the bounds of the irregular coordinate system as established by the X-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: 0.0

trXReverse (Transformation)
If the axis is linear or logarithmic, setting trXReverse True results in a coordinate system that increases from right to left, rather than in the usual direction from left to right. If the axis is irregular, setting trXReverse True results in a reversal of the direction of increasing coordinates as initially defined by the ordering of the elements of the X-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: False

trXSamples (IrregularTransformation)
Specifies the number of sample points over the X-Axis coordinate system that IrregularTransformation is to use in order to determine the reverse transformation. More sample points (usually) increase the accuracy of the reverse transformation, but at the cost of greater processing time for every transformation calculated.

This resource may be intercepted or disabled by:

Default: 9

trXTensionF (IrregularTransformation)
Specifies the value of the tension parameter applied to the spline approximation used to set up the irregular transformation for the X Axis coordinate system. Small values (less than ~1.0) imply a relaxed approximation; large values (greater than ~5.0) imply a tight approximation. Note that large values of this parameter (>~10.0) may cause the transformation to become unstable or even fail.

Default: 2.0

trYAxisType (IrregularTransformation)
This resource of type NhlTAxisType sets the type of transformation used for the Y Axis. It has three possible settings:
IrregularAxis
Based on the values of the trYCoordPoints resource (and possibly the trYInterPoints resource), an irregular coordinate system is defined along the Y Axis. If trYCoordPoints is unset or found to be invalid, a warning will be issued and trYAxisType will be reset to its default value: LinearAxis.
LogAxis
A logarithmic coordinate system is established for the Y Axis with boundaries defined by the values of trYMinF and trYMaxF. If trYMinF is less than or equal to 0.0, a warning will be issued and trYAxisType will be reset to its default value: LinearAxis.
LinearAxis
A linear coordinate system is established for the Y Axis with boundaries defined by the values of trYMinF and trYMaxF.

This resource may be intercepted or disabled by:

Default: LinearAxis

trYCoordPoints (IrregularTransformation)
If trYInterPoints is not set, this array resource represents uniformly spaced samples of a bounded, irregularly spaced data coordinate system along the Y Axis. The elements of the array must be arranged in a monotonically increasing or decreasing order. The coordinate system bounds are defined as the values of the minimum and maximum elements of the array: in other words, its first and last elements. If you superimpose on this coordinate system a regular coordinate system such that the bottom end is 0 and the top end is the number of elements in the array minus 1, then each succeeding array element value represents the coordinate value of the irregular coordinate system at successive integral coordinate points (0, 1, 2, ...) of the overlaid regular coordinate system. Note that these integral coordinates correspond directly to the array element index (with an offset of 1 when using a Fortran interface). Based on this mapping, the IrregularTransformation sets up both a forward and a reverse transformation.

trYCoordPoints is ignored unless trYAxisType is set to IrregularAxis. If the array contains less than two points or is non-monotonic, a warning will be issued and trYAxisType will be reset to its default value: LinearAxis.

This resource may be intercepted or disabled by:

V4.1 Status Note 2

Default: NULL

trYInterPoints (IrregularTransformation)
This array resource, which, if set, must contain the same number of points as trYCoordPoints, adds another step to the mapping from regular to irregular coordinates. As in the case when trYInterPoints is not set, you superimpose a bounded regular coordinate system on the irregular coordinate system. Successive elements of trYInterPoints, like those of trYCoordPoints, must increase or decrease monotonically. However, the element values have a range defined by the bounds of the superimposed regular coordinate system (0 through array size -1). Now the location of the data coordinate point specified by each successive element of the trYCoordPoints is determined, not by direct correlation with its array index, but by the value of the corresponding element of the trYInterPoints array.

trYInterPoints is ignored unless trYAxisType is set to IrregularAxis. If trYInterPoints is found to be invalid, IrregularTransformation issues a warning message and computes the coordinate transformation as if it had not been set.

This resource may be intercepted or disabled by:

Default: NULL

trYLog (LogLinTransformation)
If this boolean resource is True, the Y-Axis coordinate system is logarithmic; otherwise it is linear. When this value is set True, both trYMinF and trYMaxF are required to be greater than 0.0.

This resource may be intercepted or disabled by:

Default: False

trYMaxF (Transformation)
Specifies a maximum Y coordinate value that defines the upper bound of the Y-Axis coordinate system. If trYMaxF is less than trYMinF, the values will be exchanged before they are used to establish coordinate boundaries. If the axis is irregular, trYMaxF is constrained to lie within the bounds of the irregular coordinate system as established by the Y-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: 1.0

trYMinF (Transformation)
Specifies a minimum Y coordinate value that defines the lower bound of the Y-Axis coordinate system. If trYMinF is greater than trYMaxF, the values will be exchanged before they are used to establish coordinate boundaries. If the axis is logarithmic, trYMinF must be greater than 0.0. If the axis is irregular, trYMinF is constrained to lie within the bounds of the irregular coordinate system as established by the Y-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: 0.0

trYReverse (Transformation)
If the axis is linear or logarithmic, setting trYReverse to True results in a coordinate system that increases from top to bottom, rather than in the usual direction from bottom to top. If the axis is irregular, setting trYReverse to True results in a reversal of the direction of increasing coordinates as initially defined by the ordering of the elements of the Y-Axis coordinate array.

This resource may be intercepted or disabled by:

Default: False

trYSamples (IrregularTransformation)
Specifies the number of sample points over the Y-Axis coordinate system that IrregularTransformation is to use in order to determine the reverse transformation. More sample points (usually) increase the accuracy of the reverse transformation, but at the cost of greater processing time for every transformation calculated.

This resource may be intercepted or disabled by:

Default: 9

trYTensionF (IrregularTransformation)
Specifies the value of the tension parameter applied to the spline approximation used to set up the irregular transformation for the Y Axis coordinate system. Small values (less than ~1.0) imply a relaxed approximation; large values (greater than ~5.0) imply a tight approximation. Note that large values of this parameter (>~10.0) may cause the transformation to become unstable or even fail.

Default: 2.0