NPlot::LabelAxis Class Reference

Allows the creation of axes with any number of user defined labels at user defined world values along the axis. More...

Inheritance diagram for NPlot::LabelAxis:

NPlot::Axis List of all members.

Public Member Functions

override object Clone ()
 Deep copy of LabelAxis.
 LabelAxis (Axis a)
 Copy constructor.
 LabelAxis ()
 Default constructor.
 LabelAxis (double worldMin, double worldMax)
 Constructor.
void AddLabel (string name, double val)
 Adds a label to the axis.

Protected Member Functions

override void DrawTicks (Graphics g, Point physicalMin, Point physicalMax, out object labelOffset, out object boundingBox)
 Given Graphics surface, and physical extents of axis, draw ticks and associated labels.

Static Protected Member Functions

static void DoClone (LabelAxis b, LabelAxis a)
 Helper method for Clone.

Properties

bool TicksBetweenText
 If true, large ticks are drawn between the labels, rather than at the position of the labels.
bool ticksBetweenText_ = false
bool SortDataIfNecessary
 If your data may be be specified out of order (that is abscissa values with a higher index may be less than abscissa values of a lower index), then data sorting may be necessary to implement some of the functionality of this object.
bool sortDataIfNecessary_ = true
int PhysicalSpacingMin
 If consecutive labels are less than this number of pixels appart, some of the labels will not be drawn.
int physicalSpacingMin_ = 0
ArrayList labels_
ArrayList numbers_

Private Member Functions

void Init ()
 Initialise LabelAxis to default state.
internal override void WorldTickPositions_FirstPass (Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions)
 Determines the positions, in world coordinates, of the large ticks.

Detailed Description

Allows the creation of axes with any number of user defined labels at user defined world values along the axis.

Definition at line 63 of file LabelAxis.cs.


Constructor & Destructor Documentation

NPlot::LabelAxis::LabelAxis Axis  a  )  [inline]
 

Copy constructor.

Parameters:
a The Axis to clone.
TODO: [review notes] I don't think this will work as desired.

Definition at line 114 of file LabelAxis.cs.

NPlot::LabelAxis::LabelAxis  )  [inline]
 

Default constructor.

Definition at line 123 of file LabelAxis.cs.

Referenced by Clone().

NPlot::LabelAxis::LabelAxis double  worldMin,
double  worldMax
[inline]
 

Constructor.

Parameters:
worldMin Minimum world value
worldMax Maximum world value

Definition at line 134 of file LabelAxis.cs.


Member Function Documentation

void NPlot::LabelAxis::AddLabel string  name,
double  val
[inline]
 

Adds a label to the axis.

Parameters:
name The label
val The world value at which to place the label

Definition at line 146 of file LabelAxis.cs.

override object NPlot::LabelAxis::Clone  )  [inline, virtual]
 

Deep copy of LabelAxis.

Returns:
A copy of the LinearAxis Class.

Reimplemented from NPlot::Axis.

Definition at line 70 of file LabelAxis.cs.

References LabelAxis().

static void NPlot::LabelAxis::DoClone LabelAxis  b,
LabelAxis  a
[inline, static, protected]
 

Helper method for Clone.

Parameters:
a The original object to clone.
b The cloned object.

Definition at line 87 of file LabelAxis.cs.

References labels_, numbers_, sortDataIfNecessary_, and ticksBetweenText_.

override void NPlot::LabelAxis::DrawTicks Graphics  g,
Point  physicalMin,
Point  physicalMax,
out object  labelOffset,
out object  boundingBox
[inline, protected, virtual]
 

Given Graphics surface, and physical extents of axis, draw ticks and associated labels.

Parameters:
g The GDI+ Graphics surface on which to draw.
physicalMin The physical location of the world min point
physicalMax The physical location of the world max point
boundingBox out: smallest box that completely encompasses all of the ticks and tick labels.
labelOffset out: a suitable offset from the axis to draw the axis label.

Reimplemented from NPlot::Axis.

Definition at line 162 of file LabelAxis.cs.

void NPlot::LabelAxis::Init  )  [inline, private]
 

Initialise LabelAxis to default state.

Reimplemented from NPlot::Axis.

Definition at line 102 of file LabelAxis.cs.

internal override void NPlot::LabelAxis::WorldTickPositions_FirstPass Point  physicalMin,
Point  physicalMax,
out ArrayList  largeTickPositions,
out ArrayList  smallTickPositions
[inline, private, virtual]
 

Determines the positions, in world coordinates, of the large ticks.

Label axes do not have small ticks.

Parameters:
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
largeTickPositions ArrayList containing the positions of the large ticks.
smallTickPositions null

Reimplemented from NPlot::Axis.

Definition at line 245 of file LabelAxis.cs.


Property Documentation

ArrayList NPlot::LabelAxis::labels_ [private]
 

Definition at line 353 of file LabelAxis.cs.

Referenced by DoClone().

ArrayList NPlot::LabelAxis::numbers_ [private]
 

Definition at line 354 of file LabelAxis.cs.

Referenced by DoClone().

int NPlot::LabelAxis::PhysicalSpacingMin [get, set]
 

If consecutive labels are less than this number of pixels appart, some of the labels will not be drawn.

Definition at line 340 of file LabelAxis.cs.

int NPlot::LabelAxis::physicalSpacingMin_ = 0 [private]
 

Definition at line 350 of file LabelAxis.cs.

bool NPlot::LabelAxis::SortDataIfNecessary [get, set]
 

If your data may be be specified out of order (that is abscissa values with a higher index may be less than abscissa values of a lower index), then data sorting may be necessary to implement some of the functionality of this object.

If you know your data is already ordered with abscissa values lowest -> highest, then you may set this to false. It's default is true.

Definition at line 322 of file LabelAxis.cs.

bool NPlot::LabelAxis::sortDataIfNecessary_ = true [private]
 

Definition at line 332 of file LabelAxis.cs.

Referenced by DoClone().

bool NPlot::LabelAxis::TicksBetweenText [get, set]
 

If true, large ticks are drawn between the labels, rather than at the position of the labels.

Definition at line 299 of file LabelAxis.cs.

bool NPlot::LabelAxis::ticksBetweenText_ = false [private]
 

Definition at line 309 of file LabelAxis.cs.

Referenced by DoClone().


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:08 2005 for NPlot by  doxygen 1.4.5