IDLgrAxis

An axis object represents a single vector that may include a set of tick marks, tick labels, and a title.

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

Superclasses

This class has no superclasses.

Subclasses

This class has no subclasses.

Creation

See IDLgrAxis::Init

Methods

Intrinsic Methods

This class has the following methods:


IDLgrAxis::Cleanup

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

Calling Sequence

OBJ_DESTROY, Obj

or

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

Arguments

There are no arguments for this method.

Keywords

There are no keywords for this method.


IDLgrAxis::GetCTM

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

Calling Sequence

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

Arguments

There are no arguments for this method.

Keywords

DESTINATION

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

TOP

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


IDLgrAxis::GetProperty

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

Calling Sequence

Obj -> [IDLgrAxis::] GetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrAxis::Init IDLgrAxis::Init followed by the word "Get" can be retrieved using IDLgrAxis::GetProperty . In addition, the following keywords are available:

ALL

Set this keyword to a named variable that will contain an anonymous structure containing the values of all of the properties associated with the state of this object. State information about the object includes things like color, range, tick direction, etc., but not image, vertex, or connectivity data, or user values.

CRANGE

Set this keyword to a named variable that will contain the actual full range of the axis as a vector of the form [ minval , maxval ]. This range may not exactly match the requested range provided via the RANGE keyword in the Init and SetProperty methods. Adjustments may have been made to round to the nearest even tick interval or to accommodate the EXTEND keyword.

PARENT

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

XRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ xmin , xmax ] that specifies the range of x data coordinates covered by the graphic object.

YRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ ymin , ymax ] that specifies the range of y data coordinates covered by the graphic object.

ZRANGE

Set this keyword equal to a named variable that will contain a two-element vector of the form [ zmin , zmax ] that specifies the range of z data coordinates covered by the graphic object.


IDLgrAxis::Init

The IDLgrAxis:: Init function method initializes an axis object. IDLgrAxis is described above.

Calling Sequence

Obj = OBJ_NEW('IDLgrAxis' [, Direction] )

or

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

Arguments

Direction

An integer value specifying which axis is being created. Specify 0 (zero) to create an X axis, 1 (one) to create a Y axis, or 2 to create a Z axis.

Keywords

Properties retrievable via IDLgrAxis::GetProperty

COLOR (Get, Set)

Set this keyword to the color to be used as the foreground color for this axis. The color may be specified as a color lookup table index or as an RGB vector. The default is [255, 255, 255].

DIRECTION (Get, Set)

Set this keyword to an integer value specifying which axis is being created. Specify 0 (zero) to create an X axis, 1 (one) to create a Y axis, or 2 to create a Z axis. Specifying this keyword is the same as specifying the optional Direction argument.

EXACT (Get, Set)

Set this keyword to force the axis range to be exactly as specified. If this keyword is not set, the range may be lengthened or shortened slightly to allow for evenly spaced tick marks.

EXTEND (Get, Set)

Set this keyword to a nonzero value to extend the axis slightly beyond the specified range. This can be useful when you specify the axis range based on the minimum and maximum data values, but do not want the graphic to extend all the way to the end of the axis.

GRIDSTYLE (Get, Set)

Set this keyword to indicate the line style that should be used to draw the axis' tick marks. The value can be either an integer value specifying a pre-defined line style, or a two-element vector specifying a stippling pattern.

To use a pre-defined line style, set the LINESTYLE property equal to one of the following integer values:

To define your own stippling pattern, specify a two-element vector [ repeat , bitmask ], where repeat indicates the number of times consecutive runs of 1's or 0's in the bitmask should be repeated. (That is, if three consecutive 0's appear in the bitmask and the value of repeat is 2, then the line that is drawn will have six consecutive bits turned off.) The value of repeat must be in the range 1  £   repeat   £  255.

The bitmask indicates which pixels are drawn and which are not along the length of the line. Bitmask is most conveniently specified as a 16-bit hexadecimal value.

For example, LINESTYLE = [2, 'F0F0'X] describes a dashed line (8 bits on, 8 bits off, 8 bits on, 8 bits off).

HIDE (Get, Set)

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

LOCATION (Get, Set)

Set this keyword to a two- or three-element vector of the form [ x , y ] or [ x , y , z ] to specify the coordinate through which the axis should pass. The default is [0, 0, 0].

LOG (Get, Set)

Set this keyword to indicate that the axis is logarithmic.

MAJOR (Get, Set)

Set this keyword to an integer representing the number of major tick marks. The default is -1, specifying that IDL will compute the number of tickmarks. Setting MAJOR equal to zero suppresses major tickmarks entirely.

MINOR (Get, Set)

Set this keyword to an integer representing the number of minor tick marks. The default is -1, specifying that IDL will compute the number of tickmarks. Setting MINOR equal to zero suppresses minor tickmarks entirely.

NAME (Get, Set)

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

NOTEXT (Get, Set)

Set this keyword to prevent the tick labels and the axis title from being drawn.

RANGE (Get, Set)

Set this keyword to a two-element vector containing the minimum and maximum data values covered by the axis. The default is [0.0, 1.0].

SUBTICKLEN (Get, Set)

Set this keyword to a scale ratio specifying the length of minor tick marks relative to the length of major tick marks. The default is 0.5, specifying that the minor tick mark is one-half the length of the major tick mark.

TEXTPOS (Get, Set)

Set this keyword to either a zero or one to indicate on which side of the axis the tick text labels are to be drawn. The table below describes the placement of the tick text with each setting.

Axis

TEXTPOS=0

TEXTPOS=1

X

Tick text will be drawn below the X axis, where below is defined as being toward the direction of the negative Y axis (this is the default).

Tick text will be drawn above the X axis, where above is described as being toward the direction of the positive Y axis.

Y

Tick text will be drawn to the left of the Y Axis, where left is defined as being toward the direction of the negative X axis (this is the default).

Tick text will be drawn to the right of the Y axis, where right is defined as being toward the direction of the positive X axis.

Z

Tick text will be drawn to the left of the Z axis, where left is defined as being toward the direction of the negative X axis (this is the default).

Tick text will be drawn to the right of the Z axis, where right is defined as being toward the direction of the positive X axis.

THICK (Get, Set)

Set this keyword to an integer value between 1 and 10, specifying the line thickness used to draw the axis, in pixels. The default is one pixel.

TICKDIR (Get, Set)

Set this keyword to either zero or one to indicate the tick mark direction. For an X axis, setting TICKDIR=0 means the tick marks will be drawn above the X axis, in the direction of the positive Y axis (this is the default); setting TICKDIR=1 means the tick marks will be drawn below the X axis. For a Y axis, setting TICKDIR=0 means the tick marks will be drawn to the right of the Y axis, in the direction of the positive X axis (this is the default); setting TICKDIR=1 means the tick marks will be drawn to the left of the Y axis. For a Z axis, setting TICKDIR=0 means the tick marks will be drawn to the right the Z axis, in the direction of the positive X axis (this is the default); setting TICKDIR=1 means the tick marks will be drawn to the left of the Z axis.

TICKFORMAT (Get, Set)

Set this keyword to either a standard IDL format string (see chapter 11 of Building IDL Applications for details on format codes) or a string containing the name of a user-supplied function that returns a string to be used to format the axis tick mark labels. The function should accept integer arguments for the direction of the axis, the index of the tick mark, and the value of the tick mark, and should return a string to be used as the tick mark's label. The function may optionally accept a keyword called DATA, which will be automatically set to the TICKFRMTDATA value. The default TICKFORMAT is '', the null string, which indicates that IDL will determine the appropriate format for each value.

TICKFRMTDATA (Get, Set)

Set this keyword to a value of any type. It will be passed via the DATA keyword to the user-supplied formatting function specified via the TICKFORMAT keyword, if any. By default, this value is 0, indicating that the DATA keyword will not be set (and furthermore, need not be supported by the user-supplied function.)

TICKLEN (Get, Set)

Set this keyword to the length of each major tick mark, measured in data units. The recommended, and default, tick mark length is 0.2.

TICKTEXT (Get, Set)

Set this keyword to either a single instance of the IDLgrText object class (with multiple strings) or to a vector of instances of the IDLgrText object class (one per major tick) to specify the annotations to be assigned to the tickmarks. By default, with TICKTEXT set equal to a null object, IDL computes the tick labels based on major tick values. The positions of the provided text objects may be overwritten; position is determined according to tick mark location. The tickmark text will have the same color as the IDLgrAxis object, regardless of the color specified by the COLOR property of the IDLgrText object or objects, unless the USE_TEXT_COLOR keyword is specified.

TICKVALUES (Get, Set)

Set this keyword to a vector of data values representing the values at each tick mark. If TICKVALUES set to 0, the default, IDL computes the tick values based on the axis range and the number of major ticks.

TITLE (Get, Set)

Set this keyword to an instance of the IDLgrText object class to specify the title for the axis. The default is the null object, specifying that no title is drawn. The title will be centered along the axis, even if the text object itself has an associated location. The title will have the same color as the IDLgrAxis object, regardless of the color specified by the COLOR property of the IDLgrText object, unless the USE_TEXT_COLOR keyword is specified.

USE_TEXT_COLOR (Get, Set)

Set this keyword to indicate that, for the tick text and/or title of the axis, the color property values set for the given IDLgrText objects are to be used to draw those text items. By default, this value is zero, indicating that the color properties of the IDLgrText objects will be ignored, and that the COLOR property for the axis object will be used for these text items instead.

UVALUE (Get, Set)

Set this keyword to a value of any type. You can use this "user value" to contain any information you wish. Remember that if you set the user value equal to a pointer or object reference, you should destroy the pointer or object reference explicitly when destroying the object it is a user value of.

XCOORD_CONV (Get, Set)

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

Normalized X = s 0 + s 1 * Data X

Recommended values are:

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

The default is [0.0, 1.0].

YCOORD_CONV (Get, Set)

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

Normalized Y = s 0 + s 1 * Data Y

Recommended values are:

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

The default is [0.0, 1.0].

ZCOORD_CONV (Get, Set)

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

Normalized Z = s 0 + s 1 * Data Z

Recommended values are:

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

The default is [0.0, 1.0].


IDLgrAxis::SetProperty

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

Calling Sequence

Obj -> [IDLgrAxis::] SetProperty

Arguments

There are no arguments for this method.

Keywords

Any keyword to IDLgrAxis::Init