Interface IAxis
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
This interface describes a 1D axis (horizontal or vertical). Responsibilities include: min/max management, unit/pixel conversion, tick generation (and rendering), axis label rendering, and self-measurement for layout purposes.
public interface IAxis : IPanel
- Inherited Members
- Extension Methods
Properties
FrameLineStyle
LineStyle FrameLineStyle { get; }
Property Value
Label
The label is the text displayed distal to the ticks
LabelStyle Label { get; }
Property Value
MajorTickStyle
TickMarkStyle MajorTickStyle { get; set; }
Property Value
Max
double Max { get; set; }
Property Value
Min
double Min { get; set; }
Property Value
MinorTickStyle
TickMarkStyle MinorTickStyle { get; set; }
Property Value
Range
Min/Max range currently displayed by this axis
CoordinateRangeMutable Range { get; }
Property Value
TickGenerator
Logic for determining tick positions and formatting tick labels
ITickGenerator TickGenerator { get; set; }
Property Value
TickLabelStyle
LabelStyle TickLabelStyle { get; set; }
Property Value
Methods
GetCoordinate(float, PixelRect)
Get the coordinate of a pixel position given the location and size of the data area
double GetCoordinate(float pixel, PixelRect dataArea)
Parameters
Returns
GetCoordinateDistance(float, PixelRect)
Given a distance in pixel space, converts to coordinate space
double GetCoordinateDistance(float pixelDistance, PixelRect dataArea)
Parameters
pixelDistance
floatA distance in pixel units
dataArea
PixelRectThe rectangle onto which the coordinates are mapped
Returns
- double
The same distance in coordinate units
GetPixel(double, PixelRect)
Get the pixel position of a coordinate given the location and size of the data area
float GetPixel(double position, PixelRect dataArea)
Parameters
Returns
GetPixelDistance(double, PixelRect)
Given a distance in coordinate space, converts to pixel space
double GetPixelDistance(double coordinateDistance, PixelRect dataArea)
Parameters
coordinateDistance
doubleA distance in coordinate units
dataArea
PixelRectThe rectangle onto which the coordinates are mapped
Returns
- double
The same distance in pixel units
RegenerateTicks(PixelLength)
Use the TickLabelStyle to generate ticks with ideal spacing.
void RegenerateTicks(PixelLength size)
Parameters
size
PixelLength
SetTicks(double[], string[])
Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.
void SetTicks(double[] xs, string[] labels)