NPlot Documented Class Library

Axis Members

Axis overview

Public Static Methods

Equals (inherited from Object)Determines whether the specified Object instances are considered equal.
ReferenceEquals (inherited from Object)Determines whether the specified Object instances are the same instance.

Protected Static Methods

DoClone 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.
UpdateOffsetAndBounds Update the bounding box and label offset associated with an axis to encompass the additionally specified mergeBoundingBox and mergeLabelOffset respectively.

Public Instance Constructors

Axis Overloaded. Initializes a new instance of the Axis class.

Public Instance Properties

AutoScaleText If true, label and tick text will be scaled to match size of PlotSurface2D. If false, they won't be.
AutoScaleTicks If true, tick lengths will be scaled to match size of PlotSurface2D. If false, they won't be.
AxisColor The color of the pen used to draw the ticks and the axis line.
AxisPen The pen used to draw the ticks and the axis line.
Color Set the Axis color (sets all of axis line color, Tick text color, and label color).
FlipTicksLabel If true label is flipped about the text center line parallel to the text.
Hidden If set to true, the axis is hidden. That is, the axis line, ticks, tick labels and axis label will not be drawn.
HideTickText If true, no text will be drawn next to any axis tick marks.
IsLinear Get whether or not this axis is linear.
Label The Axis Label
LabelBrush The brush used to draw the axis label.
LabelColor The color of the brush used to draw the axis label.
LabelFont This font is used to draw the axis label.
LabelOffset 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.
LabelOffsetAbsolute 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.
LabelOffsetScaled Whether or not the supplied LabelOffset should be scaled by a factor as specified by FontScale.
LargeTickSize Length (in pixels) of a large tick. Not the distance between large ticks. The length of the tick itself.
MinPhysicalLargeTickStep If LargeTickStep isn't specified, then this will be calculated automatically. The calculated value will not be less than this amount.
NumberFormat Specifies the format used for drawing tick labels. See StringBuilder.AppendFormat for a description of this string.
Reversed If set true, the axis will behave as though the WorldMin and WorldMax values have been swapped.
SmallTickSize Length (in pixels) of the small ticks.
TicksAngle Angle to draw ticks at (measured anti-clockwise from axis direction).
TicksCrossAxis 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.
TicksIndependentOfPhysicalExtent 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.
TicksLabelAngle Angle to draw large tick labels at (clockwise from horizontal). Note: this is currently only implemented well for the lower x-axis.
TickTextBrush The brush used to draw the tick text.
TickTextColor The color of the brush used to draw the axis tick labels.
TickTextFont This font is used for the drawing of text next to the axis tick marks.
TickTextNextToAxis 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].
WorldLength World extent of the axis.
WorldMax The maximum 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.
WorldMin 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.

Public Instance Methods

Clone Deep copy of Axis.
Draw Draw the axis. This involves three steps: (1) Draw the axis line. (2) Draw the tick marks. (3) Draw the label.
DrawLabel Draw the Axis Label
DrawTick Draw a tick on the axis.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
IncreaseRange 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.
LUB 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
OutOfRange Determines whether a world value is outside range WorldMin -> WorldMax
PhysicalToWorld Return the world coordinate of the projection of the point p onto the axis.
ToString (inherited from Object)Returns a String that represents the current Object.
WorldTickPositions Determines the positions of all Large and Small ticks.
WorldToPhysical World to physical coordinate transform.

Protected Instance Methods

DrawTicks DrawTicks method. In base axis class this does nothing.
Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
getDefaultLabelOffset returns a suitable offset for the axis label in the case that there are no ticks or tick text in the way.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

Axis Class | NPlot Namespace