Table of Contents

Class SignalXYSourceDoubleArray

Namespace
ScottPlot.DataSources
Assembly
ScottPlot.dll
public class SignalXYSourceDoubleArray : ISignalXYSource, IDataSource, IGetNearest
Inheritance
SignalXYSourceDoubleArray
Implements
Inherited Members
Extension Methods

Constructors

SignalXYSourceDoubleArray(double[], double[])

public SignalXYSourceDoubleArray(double[] xs, double[] ys)

Parameters

xs double[]
ys double[]

Properties

Count

Number of values in the data source

public int Count { get; }

Property Value

int

MaximumIndex

Do not display data above this index

public int MaximumIndex { get; set; }

Property Value

int

MinimumIndex

Do not display data below this index

public int MinimumIndex { get; set; }

Property Value

int

Rotated

If enabled, Xs will be vertical and Ys will be horizontal.

public bool Rotated { get; set; }

Property Value

bool

UsePixelOverlap

public bool UsePixelOverlap { get; }

Property Value

bool

XOffset

X position of the first data point

public double XOffset { get; set; }

Property Value

double

XScale

Multiply X values by this scale factor (before applying offset)

public double XScale { get; set; }

Property Value

double

YOffset

Shift Y position of all values by this amount

public double YOffset { get; set; }

Property Value

double

YScale

Multiply Y values by this scale factor (before applying offset)

public double YScale { get; set; }

Property Value

double

Methods

GetAxisLimits()

Return the axis limits covered by these data

public AxisLimits GetAxisLimits()

Returns

AxisLimits

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 Coordinates
renderInfo RenderDetails
maxDistance float

Returns

DataPoint

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 Coordinates
renderInfo RenderDetails
maxDistance float

Returns

DataPoint

GetPixelsToDraw(RenderPack, IAxes, ConnectStyle)

Return pixels to render to display this signal. May return one extra point on each side of the plot outside the data area.

public Pixel[] GetPixelsToDraw(RenderPack rp, IAxes axes, ConnectStyle connectStyle)

Parameters

rp RenderPack
axes IAxes
connectStyle ConnectStyle

Returns

Pixel[]