NPlot::LogAxis Class Reference

The class implementing logarithmic axes. More...

Inheritance diagram for NPlot::LogAxis:

NPlot::Axis List of all members.

Public Member Functions

override object Clone ()
 Deep Copy of the LogAxis.
 LogAxis ()
 Default constructor.
 LogAxis (Axis a)
 Copy Constructor.
 LogAxis (double worldMin, double worldMax)
 Constructor.
override PointF WorldToPhysical (double coord, PointF physicalMin, PointF physicalMax, bool clip)
 World to physical coordinate transform.
override double PhysicalToWorld (PointF p, PointF physicalMin, PointF physicalMax, bool clip)
 Return the world coordinate of the projection of the point p onto the axis.

Protected Member Functions

void DoClone (LogAxis b, LogAxis a)
 Helper method for Clone (actual implementation).
override void DrawTicks (Graphics g, Point physicalMin, Point physicalMax, out object labelOffset, out object boundingBox)
 Draw the ticks.

Properties

double LargeTickStep
 The step between large ticks, expressed in decades for the Log scale.
double LargeTickValue
 Position of one of the large ticks [other positions will be calculated relative to this one].
int NumberSmallTicks
 The number of small ticks between large ticks.
object numberSmallTicks_
double largeTickValue_ = double.NaN
double largeTickStep_ = double.NaN
override double WorldMin
 The minimum world extent of the axis.
override double WorldMax
 The maximum world extent of the axis.
override bool IsLinear
 Get whether or not this axis is linear.

Private Member Functions

void Init ()
 Helper function for constructors.
internal override void WorldTickPositions_SecondPass (Point physicalMin, Point physicalMax, ArrayList largeTickPositions, ref ArrayList smallTickPositions)
 Determines the positions, in world coordinates, of the small ticks if they have not already been generated.
void CalcGrids (double dLenAxis, int nNumDivisions, ref double dDivisionInterval)
internal override void WorldTickPositions_FirstPass (Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions)
 Determines the positions, in world coordinates, of the log spaced large ticks.
double DetermineTickSpacing ()
 Determines the tick spacing.
int DetermineNumberSmallTicks (double bigTickDist)
 Determines the number of small ticks between two large ticks.

Static Private Attributes

static double m_d5Log = -Math.Log10(0.5)
static double m_d5RegionPos = Math.Abs(m_d5Log + ((1 - m_d5Log) / 2))
static double m_d5RegionNeg = Math.Abs(m_d5Log / 2)

Detailed Description

The class implementing logarithmic axes.

Definition at line 62 of file LogAxis.cs.


Constructor & Destructor Documentation

NPlot::LogAxis::LogAxis  )  [inline]
 

Default constructor.

Definition at line 99 of file LogAxis.cs.

Referenced by Clone().

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

Copy Constructor.

Parameters:
a The Axis to clone.

Definition at line 110 of file LogAxis.cs.

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

Constructor.

Parameters:
worldMin Minimum World value for the axis.
worldMax Maximum World value for the axis.

Definition at line 122 of file LogAxis.cs.


Member Function Documentation

void NPlot::LogAxis::CalcGrids double  dLenAxis,
int  nNumDivisions,
ref double  dDivisionInterval
[inline, private]
 

Definition at line 318 of file LogAxis.cs.

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

Deep Copy of the LogAxis.

Returns:
A Copy of the LogAxis Class.

Reimplemented from NPlot::Axis.

Definition at line 69 of file LogAxis.cs.

References LogAxis().

int NPlot::LogAxis::DetermineNumberSmallTicks double  bigTickDist  )  [inline, private]
 

Determines the number of small ticks between two large ticks.

Parameters:
bigTickDist The distance between two large ticks.
Returns:
The number of small ticks.

Definition at line 470 of file LogAxis.cs.

double NPlot::LogAxis::DetermineTickSpacing  )  [inline, private]
 

Determines the tick spacing.

Returns:
The tick spacing (in decades!)

Definition at line 423 of file LogAxis.cs.

void NPlot::LogAxis::DoClone LogAxis  b,
LogAxis  a
[inline, protected]
 

Helper method for Clone (actual implementation).

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

Definition at line 86 of file LogAxis.cs.

References largeTickStep_, largeTickValue_, and numberSmallTicks_.

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

Draw the ticks.

Parameters:
g The drawing surface on which to draw.
physicalMin The minimum physical extent of the axis.
physicalMax The maximum physical extent of the axis.
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.
Returns:
An ArrayList containing the offset from the axis required for an axis label to miss this tick, followed by a bounding rectangle for the tick and tickLabel drawn.

Reimplemented from NPlot::Axis.

Definition at line 145 of file LogAxis.cs.

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

Helper function for constructors.

Do initialization here so that Clear() method is handled properly

Reimplemented from NPlot::Axis.

Definition at line 129 of file LogAxis.cs.

override double NPlot::LogAxis::PhysicalToWorld PointF  p,
PointF  physicalMin,
PointF  physicalMax,
bool  clip
[inline, virtual]
 

Return the world coordinate of the projection of the point p onto the axis.

Parameters:
p The point to project onto the axis
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
clip If true, the world value will be clipped to WorldMin or WorldMax as appropriate if it lies outside this range.
Returns:
The world value corresponding to the projection of the point p onto the axis.

Reimplemented from NPlot::Axis.

Definition at line 599 of file LogAxis.cs.

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

Determines the positions, in world coordinates, of the log spaced large 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 349 of file LogAxis.cs.

internal override void NPlot::LogAxis::WorldTickPositions_SecondPass Point  physicalMin,
Point  physicalMax,
ArrayList  largeTickPositions,
ref ArrayList  smallTickPositions
[inline, private, virtual]
 

Determines the positions, in world coordinates, of the small ticks if they have not already been generated.

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 The positions of the large ticks, unchanged
smallTickPositions If null, small tick positions are returned via this parameter. Otherwise this function does nothing.

Reimplemented from NPlot::Axis.

Definition at line 213 of file LogAxis.cs.

override PointF NPlot::LogAxis::WorldToPhysical double  coord,
PointF  physicalMin,
PointF  physicalMax,
bool  clip
[inline, virtual]
 

World to physical coordinate transform.

Parameters:
coord The coordinate value to transform.
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
clip if false, then physical value may extend outside worldMin / worldMax. If true, the physical value returned will be clipped to physicalMin or physicalMax if it lies outside this range.
Returns:
The transformed coordinates.
TODO: make Reversed property work for this.

Reimplemented from NPlot::Axis.

Definition at line 556 of file LogAxis.cs.


Member Data Documentation

double NPlot::LogAxis::m_d5Log = -Math.Log10(0.5) [static, private]
 

Definition at line 314 of file LogAxis.cs.

double NPlot::LogAxis::m_d5RegionNeg = Math.Abs(m_d5Log / 2) [static, private]
 

Definition at line 316 of file LogAxis.cs.

double NPlot::LogAxis::m_d5RegionPos = Math.Abs(m_d5Log + ((1 - m_d5Log) / 2)) [static, private]
 

Definition at line 315 of file LogAxis.cs.


Property Documentation

override bool NPlot::LogAxis::IsLinear [get]
 

Get whether or not this axis is linear.

It is not.

Reimplemented from NPlot::Axis.

Definition at line 670 of file LogAxis.cs.

double NPlot::LogAxis::LargeTickStep [get, set]
 

The step between large ticks, expressed in decades for the Log scale.

Definition at line 502 of file LogAxis.cs.

double NPlot::LogAxis::largeTickStep_ = double.NaN [private]
 

Definition at line 545 of file LogAxis.cs.

Referenced by DoClone().

double NPlot::LogAxis::LargeTickValue [get, set]
 

Position of one of the large ticks [other positions will be calculated relative to this one].

Definition at line 518 of file LogAxis.cs.

double NPlot::LogAxis::largeTickValue_ = double.NaN [private]
 

Definition at line 544 of file LogAxis.cs.

Referenced by DoClone().

int NPlot::LogAxis::NumberSmallTicks [set]
 

The number of small ticks between large ticks.

Definition at line 534 of file LogAxis.cs.

object NPlot::LogAxis::numberSmallTicks_ [private]
 

Definition at line 543 of file LogAxis.cs.

Referenced by DoClone().

override double NPlot::LogAxis::WorldMax [get, set]
 

The maximum world extent of the axis.

Must be greater than zero.

Reimplemented from NPlot::Axis.

Definition at line 648 of file LogAxis.cs.

override double NPlot::LogAxis::WorldMin [get, set]
 

The minimum world extent of the axis.

Must be greater than zero.

Reimplemented from NPlot::Axis.

Definition at line 625 of file LogAxis.cs.


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