Class Scatter
- Namespace
- ScottPlot.Plottables
- Assembly
- ScottPlot.dll
public class Scatter : IPlottable, IHasLine, IHasMarker, IHasLegendText, IDataSource, IGetNearest
- Inheritance
-
Scatter
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Scatter(IScatterSource)
public Scatter(IScatterSource data)
Parameters
data
IScatterSource
Fields
ConnectStyle
The style of lines to use when connecting points.
public ConnectStyle ConnectStyle
Field Value
Properties
Axes
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.
public IAxes Axes { get; set; }
Property Value
Color
public Color Color { get; set; }
Property Value
ColorPositions
public List<Scatter.ColorPosition> ColorPositions { get; set; }
Property Value
Data
public IScatterSource Data { get; }
Property Value
FillY
public bool FillY { get; set; }
Property Value
FillYAbove
public bool FillYAbove { get; set; }
Property Value
FillYAboveColor
public Color FillYAboveColor { get; set; }
Property Value
FillYBelow
public bool FillYBelow { get; set; }
Property Value
FillYBelowColor
public Color FillYBelowColor { get; set; }
Property Value
FillYColor
public Color FillYColor { get; set; }
Property Value
FillYValue
public double FillYValue { get; set; }
Property Value
IsVisible
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).
public bool IsVisible { get; set; }
Property Value
Label
[Obsolete("use LegendText")]
public string Label { get; set; }
Property Value
LegendItems
Items which will appear in the legend
public IEnumerable<LegendItem> LegendItems { get; }
Property Value
LegendText
If populated, this text appears in the legend
public string LegendText { get; set; }
Property Value
LineColor
public Color LineColor { get; set; }
Property Value
LinePattern
public LinePattern LinePattern { get; set; }
Property Value
LineStyle
public LineStyle LineStyle { get; set; }
Property Value
LineWidth
public float LineWidth { get; set; }
Property Value
MarkerColor
public Color MarkerColor { get; set; }
Property Value
MarkerFillColor
public Color MarkerFillColor { get; set; }
Property Value
MarkerLineColor
public Color MarkerLineColor { get; set; }
Property Value
MarkerLineWidth
public float MarkerLineWidth { get; set; }
Property Value
MarkerShape
public MarkerShape MarkerShape { get; set; }
Property Value
MarkerSize
public float MarkerSize { get; set; }
Property Value
MarkerStyle
public MarkerStyle MarkerStyle { get; set; }
Property Value
MaxRenderIndex
public int MaxRenderIndex { get; set; }
Property Value
MinRenderIndex
public int MinRenderIndex { get; set; }
Property Value
OffsetX
public double OffsetX { get; set; }
Property Value
OffsetY
public double OffsetY { get; set; }
Property Value
PathStrategy
Strategy to use for generating the path used to connect points
public IPathStrategy PathStrategy { get; set; }
Property Value
ScaleX
public double ScaleX { get; set; }
Property Value
ScaleY
public double ScaleY { get; set; }
Property Value
Smooth
Controls whether points are connected by smooth or straight lines
public bool Smooth { set; }
Property Value
SmoothTension
Setting this value enables Smooth and sets the curve tension. Low tensions tend to "overshoot" data points. High tensions begin to approach connecting points with straight lines.
public double SmoothTension { get; set; }
Property Value
Methods
GetAxisLimits()
Return the 2D area (in coordinate space) occupied by the data contained in this plottable
public AxisLimits GetAxisLimits()
Returns
GetIDataSource()
Returns an optimized IDataSource to work with when having to iterate across the collection of points
public IDataSource GetIDataSource()
Returns
GetNearest(Coordinates, RenderDetails, float)
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return None if the nearest point is greater than maxDistance
pixels away.
public DataPoint GetNearest(Coordinates mouseLocation, RenderDetails renderInfo, float maxDistance = 15)
Parameters
mouseLocation
CoordinatesrenderInfo
RenderDetailsmaxDistance
float
Returns
GetNearestX(Coordinates, RenderDetails, float)
Return the point nearest a specific X location given the X/Y pixel scaling information from a previous render.
Will return None if the nearest point is greater than maxDistance
pixels away.
public DataPoint GetNearestX(Coordinates mouseLocation, RenderDetails renderInfo, float maxDistance = 15)
Parameters
mouseLocation
CoordinatesrenderInfo
RenderDetailsmaxDistance
float
Returns
GetStepDisplayPixels(Pixel[], bool)
Convert scatter plot points (connected by diagonal lines) to step plot points (connected by right angles) by inserting an extra point between each of the original data points to result in L-shaped steps.
public static Pixel[] GetStepDisplayPixels(Pixel[] pixels, bool right)
Parameters
Returns
- Pixel[]
Render(RenderPack)
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.
public virtual void Render(RenderPack rp)
Parameters
rp
RenderPack