VectSharp 2.6.1
A light library for C# vector graphics
All Classes Namespaces Functions Variables Enumerations Properties Events Pages
VectSharp.Plots.ContinuousAxisLabels Class Reference

A plot element that draws equally spaced labels on an axis. More...

Inheritance diagram for VectSharp.Plots.ContinuousAxisLabels:

Public Member Functions

 ContinuousAxisLabels (IReadOnlyList< double > startPoint, IReadOnlyList< double > endPoint, IContinuousCoordinateSystem coordinateSystem)
 Create a new ContinuousAxisLabels instance. More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics.
Parameters
targetThe Graphics on which to draw.
More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics. More...
 

Properties

IReadOnlyList< double > StartPoint [get, set]
 The starting point of the axis, expressed in data space coordinates. More...
 
IReadOnlyList< double > EndPoint [get, set]
 The ending point of the axis, expressed in data space coordinates. More...
 
double IntervalCount = 10 [get, set]
 The number of intervals between labels. Note that the number of labels will be one greater than this. More...
 
Func< int, double > Position = _ => 10 [get, set]
 The distance of the label anchor from the point on the axis. This should be set to a function accepting an int argument representing the index of the label, and return a double representing the distance of the label from the axis, in plot space coordinates. More...
 
Func< IReadOnlyList< double >, int, IEnumerable< FormattedText > > TextFormat [get, set]
 A function used to determine what text to draw at each label. You should set this to a function accepting two parameters: an IReadOnlyList<T> of doubles, representing the coordinates of the point the label refers to, and an int representing the index of the label. The function should return an IEnumerable<T> of FormattedText objects, representing the text that will be drawn. More...
 
double? Rotation = null [get, set]
 The orientation of the label with respect to the horizontal. If this is null, the labels will be perpendicular to the axis. More...
 
TextBaselines Baseline = TextBaselines.Middle [get, set]
 The baseline for the label anchor. More...
 
TextAnchors Alignment = TextAnchors.Left [get, set]
 The alignment for the label anchor. More...
 
IContinuousCoordinateSystem CoordinateSystem [get, set]
 The coordinate system used to transform the points from data space to plot space. More...
 
PlotElementPresentationAttributes PresentationAttributes = new PlotElementPresentationAttributes() [get, set]
 Presentation attributes determining the appearance of the labels. More...
 
string Tag [get, set]
 A tag to identify the labels in the plot. More...
 
- Properties inherited from VectSharp.Plots.IPlotElement
ICoordinateSystem CoordinateSystem [get]
 The coordinate system used to transform the points from data space to plot space. More...
 

Detailed Description

A plot element that draws equally spaced labels on an axis.

Definition at line 309 of file Axes.cs.

Constructor & Destructor Documentation

◆ ContinuousAxisLabels()

VectSharp.Plots.ContinuousAxisLabels.ContinuousAxisLabels ( IReadOnlyList< double >  startPoint,
IReadOnlyList< double >  endPoint,
IContinuousCoordinateSystem  coordinateSystem 
)

Create a new ContinuousAxisLabels instance.

Parameters
startPointThe starting point of the axis, expressed in data space coordinates.
endPointThe ending point of the axis, expressed in data space coordinates.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.

Definition at line 454 of file Axes.cs.

Member Function Documentation

◆ Plot()

void VectSharp.Plots.ContinuousAxisLabels.Plot ( Graphics  target)

Draw the plot element on the specified target &#160;Graphics.

Parameters
targetThe Graphics on which to draw.

Implements VectSharp.Plots.IPlotElement.

Definition at line 463 of file Axes.cs.

Property Documentation

◆ Alignment

TextAnchors VectSharp.Plots.ContinuousAxisLabels.Alignment = TextAnchors.Left
getset

The alignment for the label anchor.

Definition at line 430 of file Axes.cs.

◆ Baseline

TextBaselines VectSharp.Plots.ContinuousAxisLabels.Baseline = TextBaselines.Middle
getset

The baseline for the label anchor.

Definition at line 425 of file Axes.cs.

◆ CoordinateSystem

IContinuousCoordinateSystem VectSharp.Plots.ContinuousAxisLabels.CoordinateSystem
getset

The coordinate system used to transform the points from data space to plot space.

Implements VectSharp.Plots.IPlotElement.

Definition at line 435 of file Axes.cs.

◆ EndPoint

IReadOnlyList<double> VectSharp.Plots.ContinuousAxisLabels.EndPoint
getset

The ending point of the axis, expressed in data space coordinates.

Definition at line 319 of file Axes.cs.

◆ IntervalCount

double VectSharp.Plots.ContinuousAxisLabels.IntervalCount = 10
getset

The number of intervals between labels. Note that the number of labels will be one greater than this.

Definition at line 324 of file Axes.cs.

◆ Position

Func<int, double> VectSharp.Plots.ContinuousAxisLabels.Position = _ => 10
getset

The distance of the label anchor from the point on the axis. This should be set to a function accepting an int argument representing the index of the label, and return a double representing the distance of the label from the axis, in plot space coordinates.

Definition at line 331 of file Axes.cs.

◆ PresentationAttributes

PlotElementPresentationAttributes VectSharp.Plots.ContinuousAxisLabels.PresentationAttributes = new PlotElementPresentationAttributes()
getset

Presentation attributes determining the appearance of the labels.

Definition at line 441 of file Axes.cs.

◆ Rotation

double? VectSharp.Plots.ContinuousAxisLabels.Rotation = null
getset

The orientation of the label with respect to the horizontal. If this is null, the labels will be perpendicular to the axis.

Definition at line 346 of file Axes.cs.

◆ StartPoint

IReadOnlyList<double> VectSharp.Plots.ContinuousAxisLabels.StartPoint
getset

The starting point of the axis, expressed in data space coordinates.

Definition at line 314 of file Axes.cs.

◆ Tag

string VectSharp.Plots.ContinuousAxisLabels.Tag
getset

A tag to identify the labels in the plot.

Definition at line 446 of file Axes.cs.

◆ TextFormat

Func<IReadOnlyList<double>, int, IEnumerable<FormattedText> > VectSharp.Plots.ContinuousAxisLabels.TextFormat
getset

A function used to determine what text to draw at each label. You should set this to a function accepting two parameters: an IReadOnlyList<T> of doubles, representing the coordinates of the point the label refers to, and an int representing the index of the label. The function should return an IEnumerable<T> of FormattedText objects, representing the text that will be drawn.

Definition at line 340 of file Axes.cs.


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