ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.Plottables.ScaleBar Class Reference
Inheritance diagram for ScottPlot.Plottables.ScaleBar:
ScottPlot.IPlottable ScottPlot.IHasLine

Public Member Functions

AxisLimits GetAxisLimits ()
 Return the 2D area (in coordinate space) occupied by the data contained in this plottable.
 
virtual void Render (RenderPack rp)
 Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.
 

Properties

bool IsVisible = true [get, set]
 Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).
 
IAxes Axes = new Axes() [get, set]
 This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.
 
IEnumerable< LegendItemLegendItems [get]
 Items which will appear in the legend.
 
PixelPadding EdgePadding = new(10) [get, set]
 Distance of the corner of the scalebar from the corner of the data area.
 
PixelPadding LabelPadding = new(3) [get, set]
 Padding to add between labels and scalebar lines.
 
double Width = 1 [get, set]
 
double Height = 1 [get, set]
 
LineStyle LineStyle [get, set]
 
float LineWidth [get, set]
 
LinePattern LinePattern [get, set]
 
Color LineColor [get, set]
 
LabelStyle XLabelStyle = new() { Alignment = Alignment.UpperCenter } [get, set]
 
LabelStyle YLabelStyle = new() { Alignment = Alignment.MiddleLeft } [get, set]
 
string XLabel = string.Empty [get, set]
 
string YLabel = string.Empty [get, set]
 
- Properties inherited from ScottPlot.IPlottable
- Properties inherited from ScottPlot.IHasLine

Member Function Documentation

◆ GetAxisLimits()

AxisLimits ScottPlot.Plottables.ScaleBar.GetAxisLimits ( )

Return the 2D area (in coordinate space) occupied by the data contained in this plottable.

Implements ScottPlot.IPlottable.

◆ Render()

virtual void ScottPlot.Plottables.ScaleBar.Render ( RenderPack  rp)
inlinevirtual

Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.

Implements ScottPlot.IPlottable.

Property Documentation

◆ Axes

IAxes ScottPlot.Plottables.ScaleBar.Axes = new Axes()
getset

This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.

Implements ScottPlot.IPlottable.

◆ EdgePadding

PixelPadding ScottPlot.Plottables.ScaleBar.EdgePadding = new(10)
getset

Distance of the corner of the scalebar from the corner of the data area.

◆ Height

double ScottPlot.Plottables.ScaleBar.Height = 1
getset

◆ IsVisible

bool ScottPlot.Plottables.ScaleBar.IsVisible = true
getset

Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).

Implements ScottPlot.IPlottable.

◆ LabelPadding

PixelPadding ScottPlot.Plottables.ScaleBar.LabelPadding = new(3)
getset

Padding to add between labels and scalebar lines.

◆ LegendItems

IEnumerable<LegendItem> ScottPlot.Plottables.ScaleBar.LegendItems
get

Items which will appear in the legend.

Implements ScottPlot.IPlottable.

◆ LineColor

Color ScottPlot.Plottables.ScaleBar.LineColor
getset

Implements ScottPlot.IHasLine.

◆ LinePattern

LinePattern ScottPlot.Plottables.ScaleBar.LinePattern
getset

Implements ScottPlot.IHasLine.

◆ LineStyle

LineStyle ScottPlot.Plottables.ScaleBar.LineStyle
getset
Initial value:
= new()
{
IsVisible = true,
Width = 1,
Color = Colors.Black,
}
double Width
Definition ScaleBar.cs:20
bool IsVisible
Toggles whether this plottable is shown and contributes to the automatic axis limit detection....
Definition ScaleBar.cs:5

Implements ScottPlot.IHasLine.

◆ LineWidth

float ScottPlot.Plottables.ScaleBar.LineWidth
getset

Implements ScottPlot.IHasLine.

◆ Width

double ScottPlot.Plottables.ScaleBar.Width = 1
getset

◆ XLabel

string ScottPlot.Plottables.ScaleBar.XLabel = string.Empty
getset

◆ XLabelStyle

LabelStyle ScottPlot.Plottables.ScaleBar.XLabelStyle = new() { Alignment = Alignment.UpperCenter }
getset

◆ YLabel

string ScottPlot.Plottables.ScaleBar.YLabel = string.Empty
getset

◆ YLabelStyle

LabelStyle ScottPlot.Plottables.ScaleBar.YLabelStyle = new() { Alignment = Alignment.MiddleLeft }
getset

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