ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.Plottables.PolarAxis Class Reference

A polar axes uses spoke lines and circles to describe a polar coordinate system where points are represented by a radius and angle. This class draws a polar axes and has options to customize spokes and circles. More...

Inheritance diagram for ScottPlot.Plottables.PolarAxis:
ScottPlot.IPlottable ScottPlot.IManagesAxisLimits

Public Member Functions

void SetCircles (double maximumRadius, int count)
 Create count ticks (circles) evenly spaced between 0 and maximumRadius
 
void SetCircles (double[] positions)
 Clear existing circles and add new ones at the defined positions.
 
void SetCircles (double[] positions, string[] labels)
 Clear existing circles and add new ones at the defined positions with the given labels.
 
void SetSpokes (int count, double length, bool degreeLabels=true)
 Replace existing spokes with a new set evenly spaced around the circle.
 
void SetSpokes (Angle[] angles, double length, string[] labels)
 Replace existing spokes with new ones placed at the specified angles.
 
void SetSpokes (string[] labels, double length, bool clockwise=true)
 Replace existing spokes with new ones that have the given labels evenly spaced around the circle.
 
Coordinates GetCoordinates (double radius, double degrees)
 Return the X/Y position of a point defined in polar space.
 
Coordinates GetCoordinates (double radius, Angle angle)
 Return the X/Y position of a point defined in polar space.
 
Coordinates GetCoordinates (PolarCoordinates point)
 Return the X/Y position of a point defined in polar space.
 
Coordinates[] GetCoordinates (IReadOnlyList< double > values, bool clockwise=false)
 Return coordinates for the given radius values assuming one value per spoke.
 
AxisLimits GetAxisLimits ()
 Return the 2D area (in coordinate space) occupied by the data contained in this plottable.
 
virtual void UpdateAxisLimits (Plot plot)
 
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.
 
void RegenerateCircles (int count=3)
 
void RegenerateSpokes (int count=5)
 
void RegenerateSpokes (string[] labels)
 

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.
 
List< PolarAxisSpoke > Spokes = [] [get]
 Spokes are straight lines that extend outward from the origin.
 
List< PolarAxisCircleCircles = [] [get]
 Radial positions describing concentric circles centered on the origin.
 
Angle Rotation = Angle.FromDegrees(0) [get, set]
 Rotates the axis clockwise from its default position (where 0 points right)
 
bool StraightLines = false [get, set]
 If enabled, radial ticks will be drawn using straight lines connecting intersections circles and spokes.
 
bool ManageAxisLimits = true [get, set]
 Enable this to modify the axis limits at render time to achieve "square axes" where the units/px values are equal for horizontal and vertical axes, allowing circles to always appear as circles instead of ellipses.
 
- Properties inherited from ScottPlot.IPlottable
- Properties inherited from ScottPlot.IManagesAxisLimits

Detailed Description

A polar axes uses spoke lines and circles to describe a polar coordinate system where points are represented by a radius and angle. This class draws a polar axes and has options to customize spokes and circles.

Member Function Documentation

◆ GetAxisLimits()

AxisLimits ScottPlot.Plottables.PolarAxis.GetAxisLimits ( )
inline

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

Implements ScottPlot.IPlottable.

◆ GetCoordinates() [1/4]

Coordinates ScottPlot.Plottables.PolarAxis.GetCoordinates ( double  radius,
Angle  angle 
)
inline

Return the X/Y position of a point defined in polar space.

◆ GetCoordinates() [2/4]

Coordinates ScottPlot.Plottables.PolarAxis.GetCoordinates ( double  radius,
double  degrees 
)
inline

Return the X/Y position of a point defined in polar space.

◆ GetCoordinates() [3/4]

Coordinates[] ScottPlot.Plottables.PolarAxis.GetCoordinates ( IReadOnlyList< double >  values,
bool  clockwise = false 
)
inline

Return coordinates for the given radius values assuming one value per spoke.

◆ GetCoordinates() [4/4]

Coordinates ScottPlot.Plottables.PolarAxis.GetCoordinates ( PolarCoordinates  point)
inline

Return the X/Y position of a point defined in polar space.

◆ RegenerateCircles()

void ScottPlot.Plottables.PolarAxis.RegenerateCircles ( int  count = 3)
inline

◆ RegenerateSpokes() [1/2]

void ScottPlot.Plottables.PolarAxis.RegenerateSpokes ( int  count = 5)
inline

◆ RegenerateSpokes() [2/2]

void ScottPlot.Plottables.PolarAxis.RegenerateSpokes ( string[]  labels)
inline

◆ Render()

virtual void ScottPlot.Plottables.PolarAxis.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.

◆ SetCircles() [1/3]

void ScottPlot.Plottables.PolarAxis.SetCircles ( double  maximumRadius,
int  count 
)
inline

Create count ticks (circles) evenly spaced between 0 and maximumRadius

◆ SetCircles() [2/3]

void ScottPlot.Plottables.PolarAxis.SetCircles ( double[]  positions)
inline

Clear existing circles and add new ones at the defined positions.

◆ SetCircles() [3/3]

void ScottPlot.Plottables.PolarAxis.SetCircles ( double[]  positions,
string[]  labels 
)
inline

Clear existing circles and add new ones at the defined positions with the given labels.

◆ SetSpokes() [1/3]

void ScottPlot.Plottables.PolarAxis.SetSpokes ( Angle[]  angles,
double  length,
string[]  labels 
)
inline

Replace existing spokes with new ones placed at the specified angles.

◆ SetSpokes() [2/3]

void ScottPlot.Plottables.PolarAxis.SetSpokes ( int  count,
double  length,
bool  degreeLabels = true 
)
inline

Replace existing spokes with a new set evenly spaced around the circle.

◆ SetSpokes() [3/3]

void ScottPlot.Plottables.PolarAxis.SetSpokes ( string[]  labels,
double  length,
bool  clockwise = true 
)
inline

Replace existing spokes with new ones that have the given labels evenly spaced around the circle.

◆ UpdateAxisLimits()

virtual void ScottPlot.Plottables.PolarAxis.UpdateAxisLimits ( Plot  plot)
inlinevirtual

Property Documentation

◆ Axes

IAxes ScottPlot.Plottables.PolarAxis.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.

◆ Circles

List<PolarAxisCircle> ScottPlot.Plottables.PolarAxis.Circles = []
get

Radial positions describing concentric circles centered on the origin.

◆ IsVisible

bool ScottPlot.Plottables.PolarAxis.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.

◆ LegendItems

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

Items which will appear in the legend.

Implements ScottPlot.IPlottable.

◆ ManageAxisLimits

bool ScottPlot.Plottables.PolarAxis.ManageAxisLimits = true
getset

Enable this to modify the axis limits at render time to achieve "square axes" where the units/px values are equal for horizontal and vertical axes, allowing circles to always appear as circles instead of ellipses.

Implements ScottPlot.IManagesAxisLimits.

◆ Rotation

Angle ScottPlot.Plottables.PolarAxis.Rotation = Angle.FromDegrees(0)
getset

Rotates the axis clockwise from its default position (where 0 points right)

◆ Spokes

List<PolarAxisSpoke> ScottPlot.Plottables.PolarAxis.Spokes = []
get

Spokes are straight lines that extend outward from the origin.

◆ StraightLines

bool ScottPlot.Plottables.PolarAxis.StraightLines = false
getset

If enabled, radial ticks will be drawn using straight lines connecting intersections circles and spokes.


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