MGHGRGRAPH2D__DEFINE Class Name
MGHgrGraph2D Purpose
This class implements a 2D graph with a plot area and space for
axes & annotations. It includes several methods for adding axes,
plots, and other graphics atoms & models. Most of this
functionality is inherited from the superclass, MGHgrGraph, but
the MGHgrGraph2D knows where to put its X & Y axes and how to
scale them. Category
Object graphics. Superclasses
MGHgrGraph. Properties
The following properties (ie keywords to the Init, GetProperty &
SetProperty methods) are supported in addition to those inherited
from MGHgrGraph:
ALL (Get)
This property wraps the object's other properties in a structure.
ASPECT (Init)
A floating point number specifying the ratio between height and
width of the plot rectangle (ie. PLOT_RECT[3]/PLOT_RECT[2]). It
is used only if PLOT_RECT is not specified.
PLOT_RECT (Init, Get, Set)
This is a 4-element vector, similar in layout to
VIEWPLANE_RECT, specifying the location and dimensions in
normalised coordinates of the "plot rectangle". By default
axes and plots are drawn around, and plots in, the plot
rectangle.
XMARGIN, YMARGIN (Init, Get, Set)
2-element vectors specifying the width, in normalised
coordinates, of the margins between the plot and viewplane
rectanges. Defaults are XMARGIN = [0.375,0.15] and YMARGIN =
[0.30,0.225].
Methods
(under construction)
###########################################################################
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-08:
- Replaced existing classes MGHgrView, MGHgrGraph,
MGHgrFixedGraph & MGHgrGraph3D with MGHgrGraph (similar to the
old MGHgrView), MGHgrGraph2D (merges the old MGHgrGraph &
MGHgrFixedGraph) and MGHgrGraph3D (similar to the old class of
the same name but much of the logic has been moved to the
superclass MGHgrGraph).
- Moved auto-scaling of DIMENSIONS based on VIEWPLANE_RECT to
MGHgrGraph.
- XMARGIN and YMARGIN are no longer stored in the class
structure but are calculated as needed from VIEWPLANE_RECT and
PLOT_RECT.
- Removed the NewText method from this class (which therefore
now inherits MGHgrGraph::NewText unchanged). The functionality
previously provided by the TITLE keyword to NewText is now in
a separate method called NewTitle. The NewTitle method
requires its "text class" to have an interface very similar to
IDLgrText, whereas the NewText method can be used with any
graphics atom class that supports a FONT property and takes up
to 1 positional parameter in its Init method.
- Added REVERSE keyword to NewAxis to support creation of
reverse-direction axes. Doesn't work properly for axis titles,
or for Z axes because of a bug in IDL 5.4 beta.
- The NewBackground method now creates an MGHgrBackground, which
has some properties that make it espacially suitable for this role.
Mark Hadfield, 2001-11:
- Updated for IDL 5.5.
- Added support for ALL property.
Mark Hadfield, 2008-08:
- The NewColorBar method now calls the method of the same name
from the superclass, MGHgrGraph, and has been simplified
accordingly.