C# Класс NPlot.LinearAxis

Provides functionality for drawing axes with a linear numeric scale.
Наследование: Axis, System.ICloneable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ApproxNumberLargeTicks float
Mantissas double[]
SmallTickCounts int[]

Открытые методы

Метод Описание
AdjustedWorldValue ( double world ) : double

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.

Clone ( ) : object

Deep copy of LinearAxis.

LinearAxis ( ) : System

Default constructor.

LinearAxis ( Axis a ) : System

Copy constructor

LinearAxis ( double worldMin, double worldMax ) : System

Construct a linear axis with the provided world min and max values.

Защищенные методы

Метод Описание
DoClone ( LinearAxis b, LinearAxis a ) : void

Helper method for Clone.

DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void

Draws the large and small ticks [and tick labels] for this axis.

Приватные методы

Метод Описание
DetermineLargeTickStep ( float physicalLength, bool &shouldCullMiddle ) : double

Calculates the world spacing between large ticks, based on the physical axis length (parameter), world axis length, Mantissa values and MinPhysicalLargeTickStep. A value such that at least two

TODO: This can be optimised a bit.

DetermineNumberSmallTicks ( double bigTickDist ) : int

Given the large tick step, determine the number of small ticks that should be placed in between.

Init ( ) : void
WorldTickPositions_FirstPass ( Point physicalMin, Point physicalMax, List &largeTickPositions, List &smallTickPositions ) : void

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. If the LargeTickStep isn't set then this is calculated automatically and depends on the physical extent of the axis.

WorldTickPositions_SecondPass ( Point physicalMin, Point physicalMax, List largeTickPositions, List &smallTickPositions ) : void

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

Описание методов

AdjustedWorldValue() публичный Метод

Adjusts a real world value to one that has been modified to reflect the Axis Scale and Offset properties.
public AdjustedWorldValue ( double world ) : double
world double world value to adjust
Результат double

Clone() публичный Метод

Deep copy of LinearAxis.
public Clone ( ) : object
Результат object

DoClone() защищенный Метод

Helper method for Clone.
protected DoClone ( LinearAxis b, LinearAxis a ) : void
b LinearAxis
a LinearAxis
Результат void

DrawTicks() защищенный Метод

Draws the large and small ticks [and tick labels] for this axis.
protected DrawTicks ( Graphics g, Point physicalMin, Point physicalMax, object &labelOffset, object &boundingBox ) : void
g System.Drawing.Graphics The graphics surface on which to draw.
physicalMin Point The physical position corresponding to the world minimum of the axis.
physicalMax Point The physical position corresponding to the world maximum of the axis.
labelOffset object out: offset from the axis to draw the axis label.
boundingBox object out: smallest box that completely surrounds all ticks and associated labels for this axis.
Результат void

LinearAxis() публичный Метод

Default constructor.
public LinearAxis ( ) : System
Результат System

LinearAxis() публичный Метод

Copy constructor
public LinearAxis ( Axis a ) : System
a Axis The Axis to clone
Результат System

LinearAxis() публичный Метод

Construct a linear axis with the provided world min and max values.
public LinearAxis ( double worldMin, double worldMax ) : System
worldMin double the world minimum value of the axis.
worldMax double the world maximum value of the axis.
Результат System

Описание свойств

ApproxNumberLargeTicks публичное свойство

If LargeTickStep isn't specified, then a suitable value is calculated automatically. To determine the tick spacing, the world axis length is divided by ApproximateNumberLargeTicks and the next lowest distance m*10^e for some m in the Mantissas set and some integer e is used as the large tick spacing.
public float ApproxNumberLargeTicks
Результат float

Mantissas публичное свойство

If LargeTickStep isn't specified, then a suitable value is calculated automatically. The value will be of the form m*10^e for some m in this set.
public double[] Mantissas
Результат double[]

SmallTickCounts публичное свойство

If NumberOfSmallTicks isn't specified then .... If specified LargeTickStep manually, then no small ticks unless NumberOfSmallTicks specified.
public int[] SmallTickCounts
Результат int[]