NPlot::Axis Class Reference

Encapsulates functionality common to all axis classes. More...

Inheritance diagram for NPlot::Axis:

NPlot::DateTimeAxis NPlot::LabelAxis NPlot::LinearAxis NPlot::LogAxis NPlot::PiAxis List of all members.

Public Member Functions

virtual object Clone ()
 Deep copy of Axis.
 Axis ()
 Default constructor.
 Axis (double worldMin, double worldMax)
 Constructor that takes only world min and max values.
 Axis (Axis a)
 Copy constructor.
bool OutOfRange (double coord)
 Determines whether a world value is outside range WorldMin -> WorldMax.
void LUB (Axis a)
 Sets the world extent of the current axis to be just large enough to encompas the current world extent of the axis, and the world extent of the passed in axis.
virtual PointF WorldToPhysical (double coord, PointF physicalMin, PointF physicalMax, bool clip)
 World to physical coordinate transform.
virtual double PhysicalToWorld (PointF p, PointF physicalMin, PointF physicalMax, bool clip)
 Return the world coordinate of the projection of the point p onto the axis.
object DrawLabel (Graphics g, Point offset, Point axisPhysicalMin, Point axisPhysicalMax)
 Draw the Axis Label.
virtual void DrawTick (Graphics g, double w, float size, string text, Point textOffset, Point axisPhysMin, Point axisPhysMax, out Point labelOffset, out Rectangle boundingBox)
 Draw a tick on the axis.
virtual void Draw (System.Drawing.Graphics g, Point physicalMin, Point physicalMax, out Rectangle boundingBox)
 Draw the axis.
void WorldTickPositions (Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions)
 Determines the positions of all Large and Small ticks.
void IncreaseRange (double percent)
 Moves the world min and max values so that the world axis length is [percent] bigger.

Protected Member Functions

virtual void DrawTicks (Graphics g, Point physicalMin, Point physicalMax, out object labelOffset, out object boundingBox)
 DrawTicks method.
Point getDefaultLabelOffset (Point physicalMin, Point physicalMax)
 returns a suitable offset for the axis label in the case that there are no ticks or tick text in the way.

Static Protected Member Functions

static void DoClone (Axis b, Axis a)
 Helper method for Clone.
static void UpdateOffsetAndBounds (ref object labelOffset, ref object boundingBox, Point mergeLabelOffset, Rectangle mergeBoundingBox)
 Update the bounding box and label offset associated with an axis to encompass the additionally specified mergeBoundingBox and mergeLabelOffset respectively.

Properties

bool TicksCrossAxis
 If true, tick marks will cross the axis, with their centre on the axis line.
bool ticksCrossAxis_ = false
virtual double WorldMax
 Setting this raises the WorldMinChanged event and the WorldExtentsChanged event.
double worldMax_
virtual double WorldMin
 The minumum world extent of the axis.
double worldMin_
int LargeTickSize
 Length (in pixels) of a large tick.
int largeTickSize_
int SmallTickSize
 Length (in pixels) of the small ticks.
int smallTickSize_
string Label
 The Axis Label.
string label_
bool TickTextNextToAxis
 If true, text associated with tick marks will be drawn on the other side of the axis line [next to the axis].
bool tickTextNextToAxis_
bool Hidden
 If set to true, the axis is hidden.
bool hidden_
bool Reversed
 If set true, the axis will behave as though the WorldMin and WorldMax values have been swapped.
bool reversed_
bool HideTickText
 If true, no text will be drawn next to any axis tick marks.
bool hideTickText_
Font TickTextFont
 This font is used for the drawing of text next to the axis tick marks.
Font tickTextFont_
Font tickTextFontScaled_
Font LabelFont
 This font is used to draw the axis label.
Font labelFont_
Font labelFontScaled_
string NumberFormat
 Specifies the format used for drawing tick labels.
string numberFormat_
int MinPhysicalLargeTickStep
 If LargeTickStep isn't specified, then this will be calculated automatically.
int minPhysicalLargeTickStep_ = 30
System.Drawing.Color AxisColor
 The color of the pen used to draw the ticks and the axis line.
System.Drawing.Pen AxisPen
 The pen used to draw the ticks and the axis line.
System.Drawing.Pen linePen_
bool TicksIndependentOfPhysicalExtent
 If true, automated tick placement will be independent of the physical extent of the axis.
bool ticksIndependentOfPhysicalExtent_ = false
bool FlipTicksLabel
 If true label is flipped about the text center line parallel to the text.
bool flipTicksLabel_ = false
float TicksAngle
 Angle to draw ticks at (measured anti-clockwise from axis direction).
float ticksAngle_ = (float)Math.PI / 2.0f
float TicksLabelAngle
 Angle to draw large tick labels at (clockwise from horizontal).
float ticksLabelAngle_ = 0.0f
Color LabelColor
 The color of the brush used to draw the axis label.
Brush LabelBrush
 The brush used to draw the axis label.
Brush labelBrush_
Color TickTextColor
 The color of the brush used to draw the axis tick labels.
Brush TickTextBrush
 The brush used to draw the tick text.
Brush tickTextBrush_
bool AutoScaleText
 If true, label and tick text will be scaled to match size of PlotSurface2D.
bool autoScaleText_
bool AutoScaleTicks
 If true, tick lengths will be scaled to match size of PlotSurface2D.
bool autoScaleTicks_
StringFormat drawFormat_
double WorldLength
 World extent of the axis.
internal float FontScale
 Scale label and tick fonts by this factor.
float fontScale_
internal float TickScale
 Scale tick mark lengths by this factor.
float tickScale_
virtual bool IsLinear
 Get whether or not this axis is linear.
float labelOffset_ = 0
float LabelOffset
 If LabelOffsetAbsolute is false (default) then this is the offset added to default axis label position.
bool labelOffsetAbsolute_ = false
bool LabelOffsetAbsolute
 If true, the value specified by LabelOffset is the absolute distance away from the axis that the label is drawn.
bool labelOffsetScaled_ = true
bool LabelOffsetScaled
 Whether or not the supplied LabelOffset should be scaled by a factor as specified by FontScale.
Color Color
 Set the Axis color (sets all of axis line color, Tick text color, and label color).

Private Member Functions

void Init ()
 Helper function for constructors.
virtual internal void WorldTickPositions_FirstPass (Point physicalMin, Point physicalMax, out ArrayList largeTickPositions, out ArrayList smallTickPositions)
 Determines the positions, in world coordinates, of the large ticks.
virtual internal 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 UpdateScale ()

Detailed Description

Encapsulates functionality common to all axis classes.

All specific axis classes derive from Axis. Axis can be used as a concrete class itself - it is an Axis without any embilishments [tick marks or tick mark labels].

This class encapsulates no physical information about where the axes are drawn.

Definition at line 68 of file Axis.cs.


Constructor & Destructor Documentation

NPlot::Axis::Axis  )  [inline]
 

Default constructor.

Definition at line 676 of file Axis.cs.

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

Constructor that takes only world min and max values.

Parameters:
worldMin The minimum world coordinate.
worldMax The maximum world coordinate.

Definition at line 687 of file Axis.cs.

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

Copy constructor.

Parameters:
a The Axis to clone.

Definition at line 699 of file Axis.cs.


Member Function Documentation

virtual object NPlot::Axis::Clone  )  [inline, virtual]
 

Deep copy of Axis.

This method includes a check that guards against derived classes forgetting to implement their own Clone method. If Clone is called on a object derived from Axis, and the Clone method hasn't been overridden by that object, then the test this.GetType == typeof(Axis) will fail.

Returns:
A copy of the Axis Class

Reimplemented in NPlot::DateTimeAxis, NPlot::LabelAxis, NPlot::LinearAxis, NPlot::LogAxis, and NPlot::PiAxis.

Definition at line 563 of file Axis.cs.

Referenced by NPlot::PlotSurface2D::DetermineAxesToDraw().

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

Helper method for Clone.

Does all the copying - can be called by derived types so they don't need to implement this part of the copying themselves. also useful in constructor of derived types that takes Axis class.

Definition at line 583 of file Axis.cs.

References autoScaleText_, autoScaleTicks_, FontScale, hidden_, hideTickText_, label_, labelBrush_, labelFont_, labelOffset_, labelOffsetAbsolute_, labelOffsetScaled_, largeTickSize_, linePen_, minPhysicalLargeTickStep_, numberFormat_, reversed_, smallTickSize_, ticksAngle_, TickScale, ticksCrossAxis_, ticksIndependentOfPhysicalExtent_, ticksLabelAngle_, tickTextBrush_, tickTextFont_, tickTextNextToAxis_, worldMax_, and worldMin_.

virtual void NPlot::Axis::Draw System.Drawing.Graphics  g,
Point  physicalMin,
Point  physicalMax,
out Rectangle  boundingBox
[inline, virtual]
 

Draw the axis.

This involves three steps: (1) Draw the axis line. (2) Draw the tick marks. (3) Draw the label.

Parameters:
g The drawing surface on which to draw.
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
boundingBox out The bounding rectangle of the axis including axis line, label, tick marks and tick mark labels

Definition at line 1257 of file Axis.cs.

Referenced by NPlot::PointPlot::DrawInLegend().

object NPlot::Axis::DrawLabel Graphics  g,
Point  offset,
Point  axisPhysicalMin,
Point  axisPhysicalMax
[inline]
 

Draw the Axis Label.

Parameters:
g The GDI+ drawing surface on which to draw.
offset offset from axis. Should be calculated so as to make sure axis label misses tick labels.
axisPhysicalMin The physical position corresponding to the world minimum of the axis.
axisPhysicalMax The physical position corresponding to the world maximum of the axis.
Returns:
boxed Rectangle indicating bounding box of label. null if no label printed.

Definition at line 938 of file Axis.cs.

virtual void NPlot::Axis::DrawTick Graphics  g,
double  w,
float  size,
string  text,
Point  textOffset,
Point  axisPhysMin,
Point  axisPhysMax,
out Point  labelOffset,
out Rectangle  boundingBox
[inline, virtual]
 

Draw a tick on the axis.

Parameters:
g The graphics surface on which to draw.
w The tick position in world coordinates.
size The size of the tick (in pixels)
text The text associated with the tick
textOffset The Offset to draw from the auto calculated position
axisPhysMin The minimum physical extent of the axis
axisPhysMax The maximum physical extent of the axis
boundingBox out: The bounding rectangle for the tick and tickLabel drawn
labelOffset out: offset from the axies required for axis label

Definition at line 1046 of file Axis.cs.

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

DrawTicks method.

In base axis class this does nothing.

Parameters:
g The graphics surface on which to draw
physicalMin The physical position corresponding to the world minimum of the axis.
physicalMax The physical position corresponding to the world maximum of the axis.
labelOffset is set to a suitable offset from the axis to draw the axis label. In this base method, set to null.
boundingBox is set to the smallest box that bounds the ticks and the tick text. In this base method, set to null.

Reimplemented in NPlot::DateTimeAxis, NPlot::LabelAxis, NPlot::LinearAxis, NPlot::LogAxis, and NPlot::PiAxis.

Definition at line 1345 of file Axis.cs.

Point NPlot::Axis::getDefaultLabelOffset Point  physicalMin,
Point  physicalMax
[inline, protected]
 

returns a suitable offset for the axis label in the case that there are no ticks or tick text in the way.

Parameters:
physicalMin physical point corresponding to the axis world maximum.
physicalMax physical point corresponding to the axis world minimum.
Returns:
axis label offset

Definition at line 1592 of file Axis.cs.

void NPlot::Axis::IncreaseRange double  percent  )  [inline]
 

Moves the world min and max values so that the world axis length is [percent] bigger.

If the current world max and min values are the same, they are moved appart an arbitrary amount. This arbitrary amount is currently 0.01, and will probably be configurable in the future.

Parameters:
percent Percentage to increase world length by.
Works for the case WorldMax is less than WorldMin.

Definition at line 1447 of file Axis.cs.

Referenced by NPlot::SequenceAdapter::SuggestYAxis(), NPlot::HistogramPlot::SuggestYAxis(), and NPlot::CandlePlot::CandleDataAdapter::SuggestYAxis().

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

Helper function for constructors.

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

Reimplemented in NPlot::DateTimeAxis, NPlot::LabelAxis, NPlot::LinearAxis, NPlot::LogAxis, and NPlot::PiAxis.

Definition at line 634 of file Axis.cs.

void NPlot::Axis::LUB Axis  a  )  [inline]
 

Sets the world extent of the current axis to be just large enough to encompas the current world extent of the axis, and the world extent of the passed in axis.

Parameters:
a The other Axis instance.

Definition at line 734 of file Axis.cs.

References WorldMax, worldMax_, WorldMin, and worldMin_.

bool NPlot::Axis::OutOfRange double  coord  )  [inline]
 

Determines whether a world value is outside range WorldMin -> WorldMax.

Parameters:
coord the world value to test
Returns:
true if outside limits, false otherwise

Definition at line 710 of file Axis.cs.

virtual double NPlot::Axis::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 in NPlot::LogAxis.

Definition at line 880 of file Axis.cs.

static void NPlot::Axis::UpdateOffsetAndBounds ref object  labelOffset,
ref object  boundingBox,
Point  mergeLabelOffset,
Rectangle  mergeBoundingBox
[inline, static, protected]
 

Update the bounding box and label offset associated with an axis to encompass the additionally specified mergeBoundingBox and mergeLabelOffset respectively.

Parameters:
labelOffset Current axis label offset.
boundingBox Current axis bounding box.
mergeLabelOffset the label offset to merge. The current label offset will be replaced by this if it's norm is larger.
mergeBoundingBox the bounding box to merge. The current bounding box will be replaced by this if null, or by the least upper bound of bother bounding boxes otherwise.

Definition at line 1311 of file Axis.cs.

void NPlot::Axis::UpdateScale  )  [inline, private]
 

Definition at line 1505 of file Axis.cs.

void NPlot::Axis::WorldTickPositions Point  physicalMin,
Point  physicalMax,
out ArrayList  largeTickPositions,
out ArrayList  smallTickPositions
[inline]
 

Determines the positions of all Large and 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 ArrayList containing the positions of the small ticks.

Definition at line 1426 of file Axis.cs.

virtual internal void NPlot::Axis::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.

When the physical extent of the axis is small, some of the positions that were generated in this pass may be converted to small tick positions and returned as well.

This default implementation returns empty large ticks list and null small tick list.

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 ArrayList containing the positions of the small ticks if calculated, null otherwise.

Reimplemented in NPlot::DateTimeAxis, NPlot::LabelAxis, NPlot::LinearAxis, NPlot::LogAxis, and NPlot::PiAxis.

Definition at line 1385 of file Axis.cs.

Referenced by NPlot::Grid::Draw().

virtual internal void NPlot::Axis::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.

This default implementation creates an empty smallTickPositions list if it doesn't already exist.

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

Reimplemented in NPlot::DateTimeAxis, NPlot::LinearAxis, and NPlot::LogAxis.

Definition at line 1408 of file Axis.cs.

Referenced by NPlot::Grid::Draw().

virtual PointF NPlot::Axis::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.
Not sure how much time is spent in this often called function. If it's lots, then worth optimizing (there is scope to do so).

Reimplemented in NPlot::LogAxis.

Definition at line 785 of file Axis.cs.


Property Documentation

bool NPlot::Axis::AutoScaleText [get, set]
 

If true, label and tick text will be scaled to match size of PlotSurface2D.

If false, they won't be.

Could also be argued this belongs in PlotSurface2D

Definition at line 521 of file Axis.cs.

bool NPlot::Axis::autoScaleText_ [private]
 

Definition at line 531 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::AutoScaleTicks [get, set]
 

If true, tick lengths will be scaled to match size of PlotSurface2D.

If false, they won't be.

Could also be argued this belongs in PlotSurface2D

Definition at line 540 of file Axis.cs.

bool NPlot::Axis::autoScaleTicks_ [private]
 

Definition at line 550 of file Axis.cs.

Referenced by DoClone().

System.Drawing.Color NPlot::Axis::AxisColor [get, set]
 

The color of the pen used to draw the ticks and the axis line.

Definition at line 351 of file Axis.cs.

System.Drawing.Pen NPlot::Axis::AxisPen [get, set]
 

The pen used to draw the ticks and the axis line.

Definition at line 367 of file Axis.cs.

Color NPlot::Axis::Color [set]
 

Set the Axis color (sets all of axis line color, Tick text color, and label color).

Definition at line 1611 of file Axis.cs.

StringFormat NPlot::Axis::drawFormat_ [private]
 

Definition at line 670 of file Axis.cs.

bool NPlot::Axis::FlipTicksLabel [get, set]
 

If true label is flipped about the text center line parallel to the text.

Definition at line 409 of file Axis.cs.

bool NPlot::Axis::flipTicksLabel_ = false [private]
 

Definition at line 419 of file Axis.cs.

internal float NPlot::Axis::FontScale [get, set, private]
 

Scale label and tick fonts by this factor.

Set by PlotSurface2D Draw method.

Definition at line 1472 of file Axis.cs.

Referenced by DoClone().

float NPlot::Axis::fontScale_ [private]
 

Definition at line 1484 of file Axis.cs.

bool NPlot::Axis::Hidden [get, set]
 

If set to true, the axis is hidden.

That is, the axis line, ticks, tick labels and axis label will not be drawn.

Definition at line 223 of file Axis.cs.

bool NPlot::Axis::hidden_ [private]
 

Definition at line 233 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::HideTickText [get, set]
 

If true, no text will be drawn next to any axis tick marks.

Definition at line 258 of file Axis.cs.

bool NPlot::Axis::hideTickText_ [private]
 

Definition at line 268 of file Axis.cs.

Referenced by DoClone().

virtual bool NPlot::Axis::IsLinear [get]
 

Get whether or not this axis is linear.

Reimplemented in NPlot::LogAxis.

Definition at line 1519 of file Axis.cs.

string NPlot::Axis::Label [get, set]
 

The Axis Label.

Definition at line 186 of file Axis.cs.

string NPlot::Axis::label_ [private]
 

Definition at line 196 of file Axis.cs.

Referenced by DoClone().

Brush NPlot::Axis::LabelBrush [get, set]
 

The brush used to draw the axis label.

Definition at line 473 of file Axis.cs.

Brush NPlot::Axis::labelBrush_ [private]
 

Definition at line 483 of file Axis.cs.

Referenced by DoClone().

Color NPlot::Axis::LabelColor [set]
 

The color of the brush used to draw the axis label.

Definition at line 461 of file Axis.cs.

Font NPlot::Axis::LabelFont [get, set]
 

This font is used to draw the axis label.

Definition at line 294 of file Axis.cs.

Font NPlot::Axis::labelFont_ [private]
 

Definition at line 305 of file Axis.cs.

Referenced by DoClone().

Font NPlot::Axis::labelFontScaled_ [private]
 

Definition at line 306 of file Axis.cs.

float NPlot::Axis::LabelOffset [get, set]
 

If LabelOffsetAbsolute is false (default) then this is the offset added to default axis label position.

If LabelOffsetAbsolute is true, then this is the absolute offset of the label from the axis.

If positive, offset is further away from axis, if negative, towards the axis.

Definition at line 1536 of file Axis.cs.

float NPlot::Axis::labelOffset_ = 0 [private]
 

Definition at line 1526 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::LabelOffsetAbsolute [get, set]
 

If true, the value specified by LabelOffset is the absolute distance away from the axis that the label is drawn.

If false, the value specified by LabelOffset is added to the pre-calculated value to determine the axis label position.

Definition at line 1556 of file Axis.cs.

bool NPlot::Axis::labelOffsetAbsolute_ = false [private]
 

Definition at line 1547 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::LabelOffsetScaled [get, set]
 

Whether or not the supplied LabelOffset should be scaled by a factor as specified by FontScale.

Definition at line 1573 of file Axis.cs.

bool NPlot::Axis::labelOffsetScaled_ = true [private]
 

Definition at line 1567 of file Axis.cs.

Referenced by DoClone().

int NPlot::Axis::LargeTickSize [get, set]
 

Length (in pixels) of a large tick.

Not the distance between large ticks. The length of the tick itself.

Definition at line 152 of file Axis.cs.

int NPlot::Axis::largeTickSize_ [private]
 

Definition at line 162 of file Axis.cs.

Referenced by DoClone().

System.Drawing.Pen NPlot::Axis::linePen_ [private]
 

Definition at line 377 of file Axis.cs.

Referenced by DoClone().

int NPlot::Axis::MinPhysicalLargeTickStep [get, set]
 

If LargeTickStep isn't specified, then this will be calculated automatically.

The calculated value will not be less than this amount.

Definition at line 334 of file Axis.cs.

int NPlot::Axis::minPhysicalLargeTickStep_ = 30 [private]
 

Definition at line 344 of file Axis.cs.

Referenced by DoClone().

string NPlot::Axis::NumberFormat [get, set]
 

Specifies the format used for drawing tick labels.

See StringBuilder.AppendFormat for a description of this string.

Definition at line 315 of file Axis.cs.

string NPlot::Axis::numberFormat_ [private]
 

Definition at line 325 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::Reversed [get, set]
 

If set true, the axis will behave as though the WorldMin and WorldMax values have been swapped.

Definition at line 241 of file Axis.cs.

bool NPlot::Axis::reversed_ [private]
 

Definition at line 251 of file Axis.cs.

Referenced by DoClone().

int NPlot::Axis::SmallTickSize [get, set]
 

Length (in pixels) of the small ticks.

Definition at line 169 of file Axis.cs.

int NPlot::Axis::smallTickSize_ [private]
 

Definition at line 179 of file Axis.cs.

Referenced by DoClone().

float NPlot::Axis::TicksAngle [get, set]
 

Angle to draw ticks at (measured anti-clockwise from axis direction).

Definition at line 426 of file Axis.cs.

Referenced by NPlot::PlotSurface2D::UpdateAxes().

float NPlot::Axis::ticksAngle_ = (float)Math.PI / 2.0f [private]
 

Definition at line 436 of file Axis.cs.

Referenced by DoClone().

internal float NPlot::Axis::TickScale [get, set, private]
 

Scale tick mark lengths by this factor.

Set by PlotSurface2D Draw method.

Definition at line 1492 of file Axis.cs.

Referenced by DoClone().

float NPlot::Axis::tickScale_ [private]
 

Definition at line 1502 of file Axis.cs.

bool NPlot::Axis::TicksCrossAxis [get, set]
 

If true, tick marks will cross the axis, with their centre on the axis line.

If false, tick marks will be drawn as a line with origin starting on the axis line.

Definition at line 76 of file Axis.cs.

bool NPlot::Axis::ticksCrossAxis_ = false [private]
 

Definition at line 86 of file Axis.cs.

Referenced by DoClone().

bool NPlot::Axis::TicksIndependentOfPhysicalExtent [get, set]
 

If true, automated tick placement will be independent of the physical extent of the axis.

Tick placement will look good for charts of typical size (say physical dimensions of 640x480). If you want to produce the same chart on two graphics surfaces of different sizes [eg Windows.Forms control and printer], then you will want to set this property to true. If false [default], the number of ticks and their placement will be optimally calculated to look the best for the given axis extent. This is very useful if you are creating a cart with particularly small or large physical dimensions.

Definition at line 392 of file Axis.cs.

bool NPlot::Axis::ticksIndependentOfPhysicalExtent_ = false [private]
 

Definition at line 402 of file Axis.cs.

Referenced by DoClone().

float NPlot::Axis::TicksLabelAngle [get, set]
 

Angle to draw large tick labels at (clockwise from horizontal).

Note: this is currently only implemented well for the lower x-axis.

Definition at line 444 of file Axis.cs.

float NPlot::Axis::ticksLabelAngle_ = 0.0f [private]
 

Definition at line 454 of file Axis.cs.

Referenced by DoClone().

Brush NPlot::Axis::TickTextBrush [get, set]
 

The brush used to draw the tick text.

Definition at line 502 of file Axis.cs.

Brush NPlot::Axis::tickTextBrush_ [private]
 

Definition at line 512 of file Axis.cs.

Referenced by DoClone().

Color NPlot::Axis::TickTextColor [set]
 

The color of the brush used to draw the axis tick labels.

Definition at line 490 of file Axis.cs.

Font NPlot::Axis::TickTextFont [get, set]
 

This font is used for the drawing of text next to the axis tick marks.

Definition at line 275 of file Axis.cs.

Font NPlot::Axis::tickTextFont_ [private]
 

Definition at line 286 of file Axis.cs.

Referenced by DoClone().

Font NPlot::Axis::tickTextFontScaled_ [private]
 

Definition at line 287 of file Axis.cs.

bool NPlot::Axis::TickTextNextToAxis [get, set]
 

If true, text associated with tick marks will be drawn on the other side of the axis line [next to the axis].

If false, tick mark text will be drawn at the end of the tick mark [on the same of the axis line as the tick].

Definition at line 205 of file Axis.cs.

bool NPlot::Axis::tickTextNextToAxis_ [private]
 

Definition at line 215 of file Axis.cs.

Referenced by DoClone().

double NPlot::Axis::WorldLength [get]
 

World extent of the axis.

Definition at line 1365 of file Axis.cs.

Referenced by NPlot::AxesConstraint::YPixelWorldLength::ApplyConstraint(), and NPlot::AxesConstraint::XPixelWorldLength::ApplyConstraint().

virtual double NPlot::Axis::WorldMax [get, set]
 

Setting this raises the WorldMinChanged event and the WorldExtentsChanged event.

Reimplemented in NPlot::LogAxis.

Definition at line 99 of file Axis.cs.

Referenced by NPlot::AxesConstraint::AspectRatio::ApplyConstraint(), NPlot::Windows::PlotSurface2D::CopyDataToClipboard(), NPlot::ImagePlot::Draw(), NPlot::FilledRegion::Draw(), NPlot::ArrowItem::Draw(), LUB(), NPlot::PageAlignedPhysicalAxis::PageAlignedPhysicalAxis(), NPlot::StepPlot::SuggestXAxis(), and NPlot::HistogramPlot::SuggestXAxis().

double NPlot::Axis::worldMax_ [private]
 

Definition at line 115 of file Axis.cs.

Referenced by DoClone(), and LUB().

virtual double NPlot::Axis::WorldMin [get, set]
 

The minumum world extent of the axis.

Note that it is sensical if WorldMax is less than WorldMin - the axis would just be descending not ascending. Currently Axes won't display properly if you do this - use the Axis.Reversed property instead to achieve the same result.

Setting this raises the WorldMinChanged event and the WorldExtentsChanged event.

Reimplemented in NPlot::LogAxis.

Definition at line 128 of file Axis.cs.

Referenced by NPlot::AxesConstraint::AspectRatio::ApplyConstraint(), NPlot::Windows::PlotSurface2D::CopyDataToClipboard(), NPlot::PointPlot::Draw(), NPlot::ImagePlot::Draw(), NPlot::FilledRegion::Draw(), NPlot::ArrowItem::Draw(), LUB(), NPlot::PageAlignedPhysicalAxis::PageAlignedPhysicalAxis(), NPlot::StepPlot::SuggestXAxis(), and NPlot::HistogramPlot::SuggestXAxis().

double NPlot::Axis::worldMin_ [private]
 

Definition at line 144 of file Axis.cs.

Referenced by DoClone(), and LUB().


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