ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.IAxis Interface Reference

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. More...

Inheritance diagram for ScottPlot.IAxis:
ScottPlot.IPanel ScottPlot.IXAxis ScottPlot.IYAxis ScottPlot.AxisPanels.BottomAxis ScottPlot.AxisPanels.DateTimeXAxis ScottPlot.AxisPanels.MirroredXAxis ScottPlot.AxisPanels.TopAxis ScottPlot.AxisPanels.XAxisBase ScottPlot.AxisPanels.LeftAxis ScottPlot.AxisPanels.MirroredYAxis ScottPlot.AxisPanels.RightAxis ScottPlot.AxisPanels.YAxisBase

Public Member Functions

float GetPixel (double position, PixelRect dataArea)
 Get the pixel position of a coordinate given the location and size of the data area.
 
double GetCoordinate (float pixel, PixelRect dataArea)
 Get the coordinate of a pixel position given the location and size of the data area.
 
double GetPixelDistance (double coordinateDistance, PixelRect dataArea)
 Given a distance in coordinate space, converts to pixel space.
 
double GetCoordinateDistance (float pixelDistance, PixelRect dataArea)
 Given a distance in pixel space, converts to coordinate space.
 
void SetTicks (double[] xs, string[] labels)
 Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.
 
void RegenerateTicks (PixelLength size)
 Use the TickLabelStyle to generate ticks with ideal spacing.
 
- Public Member Functions inherited from ScottPlot.IPanel
float Measure ()
 Return the size (in pixels) of the panel in the dimension perpendicular to the edge it lays on.
 
void Render (RenderPack rp, float size, float offset)
 Draw this panel on a canvas.
 
PixelRect GetPanelRect (PixelRect dataRect, float size, float offset)
 Return the rectangle for this panel.
 

Properties

CoordinateRangeMutable Range [get]
 Min/Max range currently displayed by this axis.
 
double Min [get, set]
 
double Max [get, set]
 
ITickGenerator TickGenerator [get, set]
 Logic for determining tick positions and formatting tick labels.
 
LabelStyle Label [get]
 The label is the text displayed distal to the ticks.
 
TickMarkStyle MajorTickStyle [get, set]
 
TickMarkStyle MinorTickStyle [get, set]
 
LabelStyle TickLabelStyle [get, set]
 
LineStyle FrameLineStyle [get]
 
- Properties inherited from ScottPlot.IPanel
bool IsVisible [get, set]
 If false, the panel will not be displayed or report any size.
 
float MinimumSize [get, set]
 Disallow the panel to be smaller than this.
 
float MaximumSize [get, set]
 Disallow the panel to be larger than this.
 
Edge Edge [get]
 Indicates which edge of the data rectangle this panel lays on.
 
bool ShowDebugInformation [get, set]
 Enable this to display extra information on the axis to facilitate development.
 

Detailed Description

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.

Member Function Documentation

◆ GetCoordinate()

double ScottPlot.IAxis.GetCoordinate ( float  pixel,
PixelRect  dataArea 
)

Get the coordinate of a pixel position given the location and size of the data area.

Implemented in ScottPlot.AxisPanels.XAxisBase, and ScottPlot.AxisPanels.YAxisBase.

◆ GetCoordinateDistance()

double ScottPlot.IAxis.GetCoordinateDistance ( float  pixelDistance,
PixelRect  dataArea 
)

Given a distance in pixel space, converts to coordinate space.

Parameters
pixelDistanceA distance in pixel units
dataAreaThe rectangle onto which the coordinates are mapped
Returns
The same distance in coordinate units

Implemented in ScottPlot.AxisPanels.XAxisBase, and ScottPlot.AxisPanels.YAxisBase.

◆ GetPixel()

float ScottPlot.IAxis.GetPixel ( double  position,
PixelRect  dataArea 
)

Get the pixel position of a coordinate given the location and size of the data area.

Implemented in ScottPlot.AxisPanels.XAxisBase, and ScottPlot.AxisPanels.YAxisBase.

◆ GetPixelDistance()

double ScottPlot.IAxis.GetPixelDistance ( double  coordinateDistance,
PixelRect  dataArea 
)

Given a distance in coordinate space, converts to pixel space.

Parameters
coordinateDistanceA distance in coordinate units
dataAreaThe rectangle onto which the coordinates are mapped
Returns
The same distance in pixel units

Implemented in ScottPlot.AxisPanels.XAxisBase, and ScottPlot.AxisPanels.YAxisBase.

◆ RegenerateTicks()

void ScottPlot.IAxis.RegenerateTicks ( PixelLength  size)

Use the TickLabelStyle to generate ticks with ideal spacing.

Implemented in ScottPlot.AxisPanels.XAxisBase, and ScottPlot.AxisPanels.YAxisBase.

◆ SetTicks()

void ScottPlot.IAxis.SetTicks ( double[]  xs,
string[]  labels 
)

Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.

Property Documentation

◆ FrameLineStyle

LineStyle ScottPlot.IAxis.FrameLineStyle
get

◆ Label

LabelStyle ScottPlot.IAxis.Label
get

The label is the text displayed distal to the ticks.

◆ MajorTickStyle

TickMarkStyle ScottPlot.IAxis.MajorTickStyle
getset

◆ Max

double ScottPlot.IAxis.Max
getset

◆ Min

double ScottPlot.IAxis.Min
getset

◆ MinorTickStyle

TickMarkStyle ScottPlot.IAxis.MinorTickStyle
getset

◆ Range

CoordinateRangeMutable ScottPlot.IAxis.Range
get

Min/Max range currently displayed by this axis.

Implemented in ScottPlot.AxisPanels.MirroredXAxis, and ScottPlot.AxisPanels.MirroredYAxis.

◆ TickGenerator

ITickGenerator ScottPlot.IAxis.TickGenerator
getset

Logic for determining tick positions and formatting tick labels.

Implemented in ScottPlot.AxisPanels.DateTimeXAxis.

◆ TickLabelStyle

LabelStyle ScottPlot.IAxis.TickLabelStyle
getset

The documentation for this interface was generated from the following file: