MGHGRSYMBOL__DEFINE Class Name
MGHgrSymbol Purpose
This class implements a symbol in which the size can be specified
in normalised coordinates. It provides useful plotting symbols not
in the standard IDLgrSymbol definitions.
Properties
The following properties are supported.
COLOR (Init, Get, Set)
This is passed to the atom encapsulated by the symbol.
Note that when an IDLgrSymbol has user-defined data,
the symbol's own colour property is ignored, and the
colour is not inherited from the graphics atom to which the
symbol is attached.
NORM_SIZE (Init, Get, Set)
Symbol size in scaled coordinates. This is a 3-element,
double-precision floating point vector, but can (and usually
will) be set as a scalar. See notes on symbol-sizing below.
ROTATABLE (Init, Get, Set)
This property has permissible values 0 and 1 & specifies
whether the graphics atom that defines the symbol is embedded
in an IDlgrModel (which can be rotated) or not. If the Rotate
method is called on on a non-rotatable symbol then the symbol
is made rotatable--is that cool or what?!
SIZE (Init, Get, Set)
Symbol size in unscaled coordinates. This is the underlying
IDLgrSymbol's SIZE property, exposed so that it can be
manipulated directly if necessary, eg. by the IDLgrLegend
object. See notes on symbol-sizing below.
STYLE(Init, Get)
An integer specifying the type of symbol. Valid values are in
the range 0-4.
XSCALE (Init, Get, Set)
YSCALE (Init, Get, Set)
ZSCALE (Init, Get, Set)
Scaling factor for symbol size in x, y & z directions. See
notes on symbold sizing below.
SYMBOL SIZING:
The properties relevant to sizing the symbol are NORM_SIZE, SIZE
and [X,Y,Z]SCALE. The underlying IDLgrSymbol is resized whenever the
SetProperty method is called (and this is always done at initialisation).
The rules are:
- If SIZE is specified, then this value is used. The values of
the other properties may be changed and are retained, but they are
ignored.
- If SIZE is not specified, then the IDLgrSymbol's size is set to
self.norm_size/[self.xscale,self.yscale,self.zscale].
These rather complicated rules are used to support both explicit
sizing in data coordinates (eg by IDLgrLegend) and the automatic scaling
done by MGHgrGraph and MGHgrAxis objects.
###########################################################################
This software is provided subject to the following conditions:
1. NIWA makes no representations or warranties regarding the
accuracy of the software, the use to which the software may
be put or the results to be obtained from the use of the
software. Accordingly NIWA accepts no liability for any loss
or damage (whether direct of indirect) incurred by any person
through the use of or reliance on the software.
2. NIWA is to be acknowledged as the original author of the
software where the software is used or presented in any form.
###########################################################################
Modification History
Mark Hadfield, 2000-07:
Written, base on my earlier MGH_SYMBOL function
Mark Hadfield, 2002-10:
Updated for IDL 5.6. I managed to use array stride subscripts in
the code for STYLE=2!
Mark Hadfield, 2004-07:
- Sizing code revised, allowing cleaner code in MGHgrGraph and
MGHgrAxis.
- IDL 6.0 logical syntax.