ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.AxisPanels.XAxisBase Class Referenceabstract
Inheritance diagram for ScottPlot.AxisPanels.XAxisBase:
ScottPlot.AxisPanels.AxisBase ScottPlot.IXAxis ScottPlot.LabelStyleProperties ScottPlot.IAxis ScottPlot.IHasLabel ScottPlot.IPanel ScottPlot.AxisPanels.BottomAxis ScottPlot.AxisPanels.DateTimeXAxis ScottPlot.AxisPanels.MirroredXAxis ScottPlot.AxisPanels.TopAxis

Public Member Functions

 XAxisBase ()
 
virtual float Measure ()
 Return the size (in pixels) of the panel in the dimension perpendicular to the edge it lays on.
 
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.
 
PixelRect GetPanelRect (PixelRect dataRect, float size, float offset)
 Return the rectangle for this panel.
 
virtual void Render (RenderPack rp, float size, float offset)
 Draw this panel on a canvas.
 
double GetPixelDistance (double distance, PixelRect dataArea)
 Given a distance in coordinate space, converts to pixel space.
 
double GetCoordinateDistance (float distance, PixelRect dataArea)
 Given a distance in pixel space, converts to coordinate space.
 
void RegenerateTicks (PixelLength size)
 Use the TickLabelStyle to generate ticks with ideal spacing.
 
- Public Member Functions inherited from ScottPlot.AxisPanels.AxisBase
override string ToString ()
 
void Color (Color color)
 Apply a single color to all axis components: label, tick labels, tick marks, and frame.
 
void SetTicks (double[] xs, string[] labels)
 Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.
 
- Public Member Functions inherited from ScottPlot.IAxis
void SetTicks (double[] xs, string[] labels)
 Replace the TickGenerator with a NumericManual pre-loaded with the given ticks.
 

Properties

double Width [get]
 
- Properties inherited from ScottPlot.AxisPanels.AxisBase
bool IsVisible = true [get, set]
 
Edge Edge [get]
 
virtual CoordinateRangeMutable Range = CoordinateRangeMutable.NotSet [get]
 
float MinimumSize = 0 [get, set]
 
float MaximumSize = float.MaxValue [get, set]
 
float SizeWhenNoData = 15 [get, set]
 
PixelPadding EmptyLabelPadding = new(10, 5) [get, set]
 
PixelPadding PaddingBetweenTickAndAxisLabels = new(5, 3) [get, set]
 
PixelPadding PaddingOutsideAxisLabels = new(2, 2) [get, set]
 
bool ClipLabel = false [get, set]
 Controls whether labels should be clipped to the boundaries of the data area.
 
double Min [get, set]
 
double Max [get, set]
 
virtual ITickGenerator TickGenerator = null! [get, set]
 
LabelStyle Label [get]
 
override LabelStyle LabelStyle [get, set]
 
bool ShowDebugInformation = false [get, set]
 
LineStyle FrameLineStyle [get]
 
TickMarkStyle MajorTickStyle [get, set]
 
TickMarkStyle MinorTickStyle [get, set]
 
LabelStyle TickLabelStyle [get, set]
 
- Properties inherited from ScottPlot.LabelStyleProperties
LabelStyle LabelStyle [get, set]
 
float LabelOffsetX [get, set]
 
float LabelOffsetY [get, set]
 
float LabelRotation [get, set]
 
float LabelPadding [set]
 
PixelPadding LabelPixelPadding [get, set]
 
PixelRect LabelLastRenderPixelRect [get]
 
string LabelText [get, set]
 
Alignment LabelAlignment [get, set]
 
string LabelFontName [get, set]
 
float LabelFontSize [get, set]
 
float? LabelLineSpacing [get, set]
 
bool LabelItalic [get, set]
 
bool LabelBold [get, set]
 
Color LabelFontColor [get, set]
 
Color LabelBackgroundColor [get, set]
 
float LabelBorderRadius [get, set]
 
float LabelBorderRadiusX [get, set]
 
float LabelBorderRadiusY [get, set]
 
float LabelBorderWidth [get, set]
 
Color LabelBorderColor [get, set]
 
Color LabelShadowColor [get, set]
 
PixelOffset LabelShadowOffset [get, set]
 
- Properties inherited from ScottPlot.IHasLabel
- Properties inherited from ScottPlot.IXAxis
- Properties inherited from ScottPlot.IAxis
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from ScottPlot.AxisPanels.AxisBase
static void DrawFrame (RenderPack rp, PixelRect panelRect, Edge edge, LineStyle lineStyle)
 Draw a line along the edge of an axis on the side of the data area.
 
static void DrawTicks (RenderPack rp, LabelStyle label, PixelRect panelRect, IEnumerable< Tick > ticks, IAxis axis, TickMarkStyle majorStyle, TickMarkStyle minorStyle)
 

Constructor & Destructor Documentation

◆ XAxisBase()

ScottPlot.AxisPanels.XAxisBase.XAxisBase ( )
inline

Member Function Documentation

◆ GetCoordinate()

double ScottPlot.AxisPanels.XAxisBase.GetCoordinate ( float  pixel,
PixelRect  dataArea 
)
inline

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

Implements ScottPlot.IAxis.

◆ GetCoordinateDistance()

double ScottPlot.AxisPanels.XAxisBase.GetCoordinateDistance ( float  pixelDistance,
PixelRect  dataArea 
)
inline

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

Implements ScottPlot.IAxis.

◆ GetPanelRect()

PixelRect ScottPlot.AxisPanels.XAxisBase.GetPanelRect ( PixelRect  dataRect,
float  size,
float  offset 
)
inline

Return the rectangle for this panel.

Implements ScottPlot.IPanel.

◆ GetPixel()

float ScottPlot.AxisPanels.XAxisBase.GetPixel ( double  position,
PixelRect  dataArea 
)
inline

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

Implements ScottPlot.IAxis.

◆ GetPixelDistance()

double ScottPlot.AxisPanels.XAxisBase.GetPixelDistance ( double  coordinateDistance,
PixelRect  dataArea 
)
inline

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

Implements ScottPlot.IAxis.

◆ Measure()

virtual float ScottPlot.AxisPanels.XAxisBase.Measure ( )
inlinevirtual

Return the size (in pixels) of the panel in the dimension perpendicular to the edge it lays on.

Returns

Implements ScottPlot.IPanel.

◆ RegenerateTicks()

void ScottPlot.AxisPanels.XAxisBase.RegenerateTicks ( PixelLength  size)
inline

Use the TickLabelStyle to generate ticks with ideal spacing.

Implements ScottPlot.IAxis.

◆ Render()

virtual void ScottPlot.AxisPanels.XAxisBase.Render ( RenderPack  rp,
float  size,
float  offset 
)
inlinevirtual

Draw this panel on a canvas.

Parameters
surfacecontains the canvas to draw on
dataRectdimensions of the data area (pixel units)
sizesize of this panel (pixel units)
offsetdistance from the edge of this panel to the edge of the data area

Implements ScottPlot.IPanel.

Property Documentation

◆ Width

double ScottPlot.AxisPanels.XAxisBase.Width
get

Implements ScottPlot.IXAxis.


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