Using this Chapter

The elements of IDL's graphics class library are documented alphabetically in this chapter. The page or pages describing each class include references to sub- and super-classes, and to the methods associated with the class. Class methods are documented alphabetically following the description of the class itself.

A description of each method follows its name. Beneath the general description of the method are a number of sections that describe the calling sequence for the method, its arguments (if any), its keywords (if any). These sections are described below.

Calling Sequence

The "Calling Sequence" section shows the proper syntax for calling the method.

Procedure Methods

IDL procedure methods have the calling sequence:

Obj -> PROCEDURE_NAME, Argument [, Optional_Arguments]

where Obj is a valid object reference, PROCEDURE_NAME is the name of the procedure method, Argument is a required parameter, and Optional_Argument is an optional parameter to the procedure method. Note that the square brackets around optional arguments are not used in the actual call to the procedure, they are simply used to denote the optional nature of the arguments within this document.

Function Methods

IDL function methods have the calling sequence:

Result = Obj -> FUNCTION_NAME( Argument [, Optional_Arguments] )

where Obj is a valid object reference, Result is the returned value of the function method, FUNCTION_NAME is the name of the function method, Argument is a required parameter, and Optional_Argument is an optional parameter. Note that the square brackets around optional arguments are not used in the actual call to the function, they are simply used to denote the optional nature of the arguments within this document. Note also that all arguments and keyword arguments to functions should be supplied within the parentheses that follow the function's name.

Arguments

The "Arguments" section describes each valid argument to the method. Note that these arguments are positional parameters that must be supplied in the order indicated by the method's calling sequence.

Named Variables

Often, arguments that contain values upon return from the function or procedure method ("output arguments") are described as accepting " named variables". A named variable is simply a valid IDL variable name. This variable does not need to be defined before being used as an output argument. Note, however that when an argument calls for a named variable, only a named variable can be used--sending an expression causes an error.

Keywords

The "Keywords" section describes each valid keyword argument to the method. Note that keyword arguments are formal parameters that can be supplied in any order.

Keyword arguments are supplied to IDL methods by including the keyword name followed by an equal sign ("=") and the value to which the keyword should be set. Note that keywords can be abbreviated to their shortest unique length. For example, the XSTYLE keyword can be abbreviated to XST.

Setting Keywords

When the documentation for a keyword says something similar to, "Set this keyword to enable logarithmic plotting," the keyword is simply a switch that turns an option on and off. Usually, setting such keywords equal to 1 causes the option to be turned on. Explicitly setting the keyword to zero (or not including the keyword) turns the option off.

There is a "shortcut" that can be used to set a keyword equal to 1 without the usual syntax (i.e., KEYWORD=1 ). To "set" a keyword, simply preface it with a slash character ("/"). For example, to plot a wire mesh surface with a skirt around it, set the SKIRT keyword to the SURFACE routine as follows:

SURFACE, DIST(10), /SKIRT

Creating Objects from the Graphics Class Library

To create an object from the IDL Graphics Class Library, use the OBJ_NEW function (see "OBJ_NEW" in the IDL Reference Guide ). The Init method for each class describes the arguments and keywords available when you are creating a new graphics object. Note that in some cases, you can also use the Init method after the object has been created.

For example, to create a new graphics object from the IDLgrAxis class, use the following call to OBJ_NEW along with the arguments and keywords accepted by the IDLgrAxis::Init method:

myAxis = OBJ_NEW(IDLgrAxis, DIRECTION=1, RANGE=[0.0,40.0])