Subclasses of the Transform class support a data coordinate space along with forward and reverse transformations between data coordinates and normalized device coordinates.
All HLU "plot objects" are instances of Transform subclasses. The existing Transform subclasses include XyPlot, ContourPlot, and MapPlot, as well as LogLinPlot and IrregularPlot. Each of these classes includes as composite class members one or more subclasses of the Transformation class. The Transform class itself provides the data coordinate space while the Transformation subclass performs the actual transformations of the data. Note that although the TickMark object understands and uses transformations, it does not belong to the Transform class, since it does not support its own data space. The following sections discuss the transformational capabilities of each of the Transform subclasses.
The XyPlot class includes both the LogLinTransformation and the IrregularTransformation as composite class members. It allows access only to the Transformation resources used to set the boundaries of the data coordinate space. Each XyPlot axis can be set individually to use a linear, log, or irregular transformation.
The transformation type of an axis for an XyPlot object is set using the resources xyXStyle and xyYStyle. The options are:
The default transformation type is Linear.
If you set either axis to "Irregular", you must supply an array of points as a representation of the irregular coordinate system. For the X Axis, you would set the array resource xyXIrregularPoints, and for the Y Axis, you would set xyYIrregularPoints.
The ContourPlot class includes both the LogLinTransformation and the IrregularTransformation as composite class members. It allows limited access to a number of Transformation resources.
Selecting the transformation type for the ContourPlot object is a little more subtle than for the XyPlot. If either of the ScalarField object resources sfXArray or sfYArray is non null, then the axis corresponding to that array is assumed to be irregular. It does not need to be explicitly set by another resource.
To set a ContourPlot axis to logarithmic scaling, you set the LogLinTransformation composite resources, trXLog or trYLog, to a value of True. A value of False, the default, will result in that axis having linear scaling, unless it is assumed to be irregular.
The MapPlot class includes the MapTransformation as a composite class member. It allows access to all but one of the MapTransformation resources. Among the MapPlot transformation options are ten different geographic mapping projections, selected by setting the resource mpProjection:
CylindricalEquidistant is the default MapPlot transformation.
The MapTransformation class also includes a number of resources for limiting the boundaries of the projected area.
The default is LinearAxis.
If you set either axis to "IrregularAxis", you must supply an array of points as a representation of the irregular coordinate system. For the X Axis, you would set the array resource trXCoordPoints, and for the Y Axis, you would set trYCoordPoints.
Keep in mind that you never need (or are allowed) to instantiate any of the Transformation subclasses since they are built in as composite class members of the Transform subclasses. The resources belonging to these transformation classes are available to instantiated Transform class objects. Of course, as with any composite class member, the Transform subclasses may intercept or disable some or most of the Transformation class resources. For examples of how to set transformation options in your code, or in your resource files refer to the examples listed in the following section.
To copy any of these examples into your current working directory, you can type:
ng4ex -n example_name(exclude the .c or .f, for example:
ng4ex -n tm03f
). To run the example, omit the -n.
NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?