# Catalyst Source-Coordinates Directory On-Line Help

This page was created by the IDL library routine `mk_html_help`. For more information on this routine, refer to the IDL Online Help Navigator or type:

         ? mk_html_help

at the IDL command line prompt.

Last modified: Sun Oct 26 20:43:11 2008.

# List of Routines

- CATCOORD
- CATCOORD::CLEANUP
- CATCOORD::DRAW
- CATCOORD::GETPROPERTY
- CATCOORD::INIT
- CATCOORD::SETPROPERTY
- PLOTCOORD
- PLOTCOORD::CLEANUP
- PLOTCOORD::DRAW
- PLOTCOORD::GETPROPERTY
- PLOTCOORD::INIT
- PLOTCOORD::RESTORE
- PLOTCOORD::SAVECOORDS
- PLOTCOORD::SETCOORDINATES
- PLOTCOORD::SETPROPERTY
- PLOTCOORD::SETSYSTEMDEFAULTS

# Routine Descriptions

## CATCOORD

[Next Routine] [List of Routines]

     NAME:
           CATCOORD

     PURPOSE:

           The purpose of this object is to create a coordinate system for data objects.
           The object is meant to reside in the _COORDS field of CATDATAATOM objects.
           The CATCOORD object creates a coordinate system at the time it is drawn by setting
           certain plotting system variables based on the position and range stored internally.
           Thus, for the coordinate system to be current, the DRAW method must be called prior
           to any action that relies on the coordinate system being established. (This is different,
           in general, from the PLOTCOORD object).) It is assumed that at the time the DRAW method
           is called, the current window (!D.Window) is the one for which data coordinates are desired.

     AUTHORS:

            FANNING SOFTWARE CONSULTING   BURRIDGE COMPUTING
            1645 Sheely Drive             18 The Green South
            Fort Collins                  Warborough, Oxon
            CO 80526 USA                  OX10 7DN, ENGLAND
            Phone: 970-221-0438           Phone: +44 (0)1865 858279
            E-mail: davidf@dfanning.com   E-mail: davidb@burridgecomputing.co.uk

     CATEGORY:

           Programming.

     CALLING SEQUENCE:

           theCoordObj = Obj_New('CatCoord')

     CLASS_STRUCTURE:

       class = { CATCOORD, $
                 _position: DblArr(4), $  ; A four-element array representing the position of the "axes" in the window.
                 _xrange: DblArr(2), $    ; A two-element array representing the range of the X axis.
                 _xs: DblArr(2), $        ; A two-element array representing the scaling factors for the X axis.
                 _yrange: DblArr(2), $    ; A two-element array representing the range of the Y axis.
                 _ys: DblArr(2), $        ; A two-element array representing the scaling factors for the Y axis.
                 INHERITS CATATOM $
               }

     MODIFICATION_HISTORY:

           Written by: David W. Fanning, 15 September 2003.
           Modified to *not* use PLOT command to set data coordinate system. 23 March 2004. DWF.
           Changed the default postion to [0.0, 0.0, 1.0, 1.0] after spending *another* two hours
              chasing a coordinate problem for the umpteenth time! 27 Dec 2004. DWF.
           Added a modification to !P.CLIP in the DRAW method to affect proper clipping. 6 Oct 2006. DWF.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## CATCOORD::CLEANUP

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           CATCOORD::CLEANUP

     PURPOSE:

           This is the CATCOORD object class destructor method.

     SYNTAX:

           Called automatically when the object is destroyed.

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## CATCOORD::DRAW

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           CATCOORD::DRAW

     PURPOSE:

           This method establishes the coordinate system of the object by
           setting parameters in the !X and !Y system variables.

     SYNTAX:

           coordObj -> Draw

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## CATCOORD::GETPROPERTY

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           CATCOORD::GETPROPERTY

     PURPOSE:

           This method allows the user to get the stored system variables in the object

     SYNTAX:

           coordObj -> GetProperty, Mapsysvar=mapsysvar

     ARGUMENTS:

           None.

     KEYWORDS:

           POSITION:     A four-element array representing the position of the plot in the window.

           XRANGE:       A two-element array representing the range for the X data axis.

           XSCALE:       A two-element array representing the scaling factors for the X data axis.

           YRANGE:       A two-element array representing the range for the Y data axis.

           YSCALE:       A two-element array representing the scaling factors for the Y data axis.

           _REF_EXTRA:   Any keywords appropriate for superclass GetProperty methods.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## CATCOORD::INIT

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           CATCOORD::INIT

     PURPOSE:

           This is the CATCOORD object class creator method.

     SYNTAX:

           Called automatically when the object is created.

     ARGUMENTS:

           None.

     KEYWORDS:

           PARENT:       An object reference of the parent object. If provided, the CATCOORDS object
                         will add itself to the parent with the COORDS_OBJECT keyword to SETPROPERTY.
                         The parent should be a subclassed CATDATAATOM object.

           POSITION:     A four-element array representing the position of the plot in the window.
                         Use normalized coordinates (0 to 1) in this order: [x0, y0, x1, y1]. The
                         default is [0,0,1,1].

           XRANGE:       A two-element array representing the range for the X data axis. Default is [0,1].

           YRANGE:       A two-element array representing the range for the Y data axis. Default is [0,1].

           _REF_EXTRA:   Any keywords appropriate for superclass INIT methods.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## CATCOORD::SETPROPERTY

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           CATCOORD::SETPROPERTY

     PURPOSE:

           This method allows the user to set the stored system variables in the object.

     SYNTAX:

           coordObj -> SetProperty, Mapsysvar=!Map

     ARGUMENTS:

           None.

     KEYWORDS:

           PARENT:       An object reference of the parent object. If provided, the CATCOORDS object
                         will add itself to the parent with the COORDS_OBJECT keyword to SETPROPERTY.
                         The parent should be a subclassed CATDATAATOM object.

           POSITION:     A four-element array representing the position of the plot in the window.
                         Use normalized coordinates (0 to 1) in this order: [x0, y0, x1, y1].

           XRANGE:       A two-element array representing the range for the X data axis. Default is [0,1].

           YRANGE:       A two-element array representing the range for the Y data axis. Default is [0,1].

           _EXTRA:       Any keywords appropriate for superclass SetProperty methods.

(See C:\IDL\Catalyst\source\coordinates\catcoord__define.pro)

## PLOTCOORD

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD

     PURPOSE:

           The purpose of this object is to create a coordinate system for generic data objects.
           It does this by saving IDL system variables. Typically, the PLOTCOORD object is updated
           *after* a plot is drawn in a window and acts to save the plotting parameters for that
           particular plot. This is useful, for example, when you wish to overplot data on the plot
           in question. You can call the draw method of the PLOTCOORD object to re-establish the plot
           parameters for overplotting.

     AUTHORS:

            FANNING SOFTWARE CONSULTING   BURRIDGE COMPUTING
            1645 Sheely Drive             18 The Green South
            Fort Collins                  Warborough, Oxon
            CO 80526 USA                  OX10 7DN, ENGLAND
            Phone: 970-221-0438           Phone: +44 (0)1865 858279
            E-mail: davidf@dfanning.com   E-mail: davidb@burridgecomputing.co.uk

     CATEGORY:

           Programming.

     CALLING SEQUENCE:

           theCoordObj = Obj_New('PlotCoord')

     MODIFICATION_HISTORY:

           Written by: David W. Fanning, 15 September 2003.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::CLEANUP

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::CLEANUP

     PURPOSE:

           This is the PLOTCOORD object class destructor method.

     SYNTAX:

           Called automatically when the object is destroyed.

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::DRAW

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::DRAW

     PURPOSE:

           This method establishes the coordinate system of the object by
           replacing the !Map, !P, !X, !Y, and !Z system variables with their
           stored equivalents. The current system variables are saved so they
           can be restored with the RESTORE method later.

     SYNTAX:

           coordObj -> Draw

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::GETPROPERTY

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::GETPROPERTY

     PURPOSE:

           This method allows the user to get the stored system variables in the object

     SYNTAX:

           coordObj -> GetProperty, Mapsysvar=mapsysvar

     ARGUMENTS:

           None.

     KEYWORDS:

           MAPSYSVAR:   The !Map system variable stored in the object.

           POSITION:    The !P.Position value.

           PSYSVAR:     The !P system variable stored in the object.

           XSYSVAR:     The !X system variable stored in the object.

           YSYSVAR:     The !Y system variable stored in the object.

           ZSYSVAR:     The !Z system variable stored in the object.

           _REF_EXTRA:  Any keyword appropriate for the superclass method.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::INIT

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::INIT

     PURPOSE:

           This is the PLOTCOORD object class creator method.

     SYNTAX:

           Called automatically when the object is created.

     ARGUMENTS:

           parent:      The parent object to which this coordinate object will be added.

     KEYWORDS:

           MAPSYSVAR:   The !Map system variable to store in the object.

           PSYSVAR:     The !P system variable to store in the object.

           XSYSVAR:     The !X system variable to store in the object.

           YSYSVAR:     The !Y system variable to store in the object.

           XSYSVAR:     The !Z system variable to store in the object.

           _EXTRA:      Any keyword appropriate for the superclass method.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::RESTORE

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::RESTORE

     PURPOSE:

           This method restores the coordinate system that was in place at the
           time of the last DRAW method invocation.

     SYNTAX:

           coordObj -> Restore

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::SAVECOORDS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::SAVECOORDS

     PURPOSE:

           This method allows the object to save the currently established coordinate system.
           The system variables !MAP, !P, !X, !Y, and !Z are saved.

     SYNTAX:

           coordObj -> SaveCoords

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::SETCOORDINATES

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::SETCOORDINATES

     PURPOSE:

           This method allows user to set up a 2D data coordinate system as used by the
           IDL PLOT, CONTOUR, etc. commands.

     SYNTAX:

           coordObj -> SetCoordinates, Position=[0.1, 0.1, 0.5, 0.75], XRange=[1,10], YRange=[3,9]

     ARGUMENTS:

           None.

     KEYWORDS:

           AUTOSCALE:    Set this keyword if you wish the axis plot ranges to be autoscaled. The
                         default is to set exact axis ranges based on the [XYZ]Range keywords.

           ASPECT_RATIO: If this keyword is set to a floating point value indicating the aspect
                         ratio (height/width) of the resulting data coordinate system, the POSITION
                         keyword will be modified to represent this aspect ratio. This is primarily
                         for the convenience of CatImageData, which can display its image in a
                         resizeable graphics window with the correct image aspect ratio. If you use
                         this keyword, you can find the new POSITION by using the GetProperty method:

                              coordObj -> GetProperty, Position=adjustedPosition

           POSITION:     A four-element array representing the position of the plot in the window.

           WINDEX:       The window index number of the window for which the data coordinate
                         system is being established. By default, !D.Window is used.

           XRANGE:       A two-element array representing the range for the X data axis. Default is [0,1].

           XSIZE:        The X size of the window for which data coordinates are to be set. Used only if
                         WINDEX is not provided.

           YRANGE:       A two-element array representing the range for the Y data axis. Default is [0,1].

           YSIZE:        The Y size of the window for which data coordinates are to be set. Used only if
                         WINDEX is not provided.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::SETPROPERTY

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
           PLOTCOORD::SETPROPERTY

     PURPOSE:

           This method allows the user to set the stored system variables in the object.

     SYNTAX:

           coordObj -> SetProperty, Mapsysvar=!Map

     ARGUMENTS:

           None.

     KEYWORDS:

           MAPSYSVAR:   The !Map system variable to store in the object.

           PSYSVAR:     The !P system variable to store in the object.

           XSYSVAR:     The !X system variable to store in the object.

           YSYSVAR:     The !Y system variable to store in the object.

           ZSYSVAR:     The !Z system variable to store in the object.

           _EXTRA:      Any keyword appropriate for the superclass method.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)

## PLOTCOORD::SETSYSTEMDEFAULTS

[Previous Routine] [List of Routines]

     NAME:
           PLOTCOORD::SETSYSTEMDEFAULTS

     PURPOSE:

           This method allows the object to set the stored system variables to the normal
           system default values.

     SYNTAX:

           coordObj -> SetSystemDefaults

     ARGUMENTS:

           None.

     KEYWORDS:

           None.

(See C:\IDL\Catalyst\source\coordinates\plotcoord__define.pro)