CATCOORD__DEFINE 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.
Added a check to the DRAW method that makes sure there is an open window for the
coordinate conversion that has to take place. 12 Dec 2008. DWF.
Had to go back to drawing a plot in the DRAW method to avoid a MAP_SET problem that
caused CONVERT_COORD to throw NANs. 30 December 2008. DWF.