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

Public Member Functions

 DataStreamer (Plot plot, double[] data)
 
void Add (double value)
 Shift in a new Y value.
 
void Add (double[] ys)
 
void AddRange (IEnumerable< double > values)
 Shift in a collection of new Y values.
 
void Clear (double value=0)
 Clear the buffer by setting all Y points to the given value.
 
void ViewWipeRight (double blankFraction=0)
 Display the data using a view where new data overlaps old data from left to right.
 
void ViewWipeLeft ()
 Display the data using a view where new data overlaps old data from right to left.
 
void ViewScrollLeft ()
 Display the data using a view that continuously shifts data to the left, placing the newest data on the right.
 
void ViewScrollRight ()
 Display the data using a view that continuously shifts data to the right, placing the newest data on the left.
 
void ViewCustom (DataViews.IDataStreamerView view)
 Display the data using a custom rendering function.
 
AxisLimits GetAxisLimits ()
 Return the 2D area (in coordinate space) occupied by the data contained in this plottable.
 
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.
 

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 = ScottPlot.Axes.Default [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.
 
string Label [get, set]
 
string LegendText = string.Empty [get, set]
 If populated, this text appears in the legend.
 
LineStyle LineStyle = new() { Width = 1 } [get, set]
 
float LineWidth [get, set]
 
LinePattern LinePattern [get, set]
 
Color LineColor [get, set]
 
MarkerStyle MarkerStyle = new(MarkerShape.FilledCircle, 0) [get, set]
 
MarkerShape MarkerShape [get, set]
 
float MarkerSize [get, set]
 
Color MarkerFillColor [get, set]
 
Color MarkerLineColor [get, set]
 
Color MarkerColor [get, set]
 
float MarkerLineWidth [get, set]
 
Color Color [get, set]
 
DataStreamerSource Data [get, set]
 
int Count [get]
 
int CountTotal [get]
 
double Period [get, set]
 
bool HasNewData [get]
 Returns true if data has been added since the last render.
 
bool ManageAxisLimits = true [get, set]
 If enabled, axis limits will be adjusted automatically if new data runs off the screen.
 
bool ContinuouslyAutoscale = false [get, set]
 
DataViews.IDataStreamerView Renderer [get, set]
 Logic for displaying the fixed-length Y values in Data
 
- Properties inherited from ScottPlot.IPlottable
- Properties inherited from ScottPlot.IManagesAxisLimits
- Properties inherited from ScottPlot.IHasLine
- Properties inherited from ScottPlot.IHasLegendText
- Properties inherited from ScottPlot.IHasMarker

Constructor & Destructor Documentation

◆ DataStreamer()

ScottPlot.Plottables.DataStreamer.DataStreamer ( Plot  plot,
double[]  data 
)
inline

Member Function Documentation

◆ Add() [1/2]

void ScottPlot.Plottables.DataStreamer.Add ( double  value)
inline

Shift in a new Y value.

◆ Add() [2/2]

void ScottPlot.Plottables.DataStreamer.Add ( double[]  ys)
inline

◆ AddRange()

void ScottPlot.Plottables.DataStreamer.AddRange ( IEnumerable< double >  values)
inline

Shift in a collection of new Y values.

◆ Clear()

void ScottPlot.Plottables.DataStreamer.Clear ( double  value = 0)
inline

Clear the buffer by setting all Y points to the given value.

◆ GetAxisLimits()

AxisLimits ScottPlot.Plottables.DataStreamer.GetAxisLimits ( )
inline

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

Implements ScottPlot.IPlottable.

◆ Render()

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

◆ UpdateAxisLimits()

void ScottPlot.Plottables.DataStreamer.UpdateAxisLimits ( Plot  plot)
inline

◆ ViewCustom()

void ScottPlot.Plottables.DataStreamer.ViewCustom ( DataViews::IDataStreamerView  view)
inline

Display the data using a custom rendering function.

◆ ViewScrollLeft()

void ScottPlot.Plottables.DataStreamer.ViewScrollLeft ( )
inline

Display the data using a view that continuously shifts data to the left, placing the newest data on the right.

◆ ViewScrollRight()

void ScottPlot.Plottables.DataStreamer.ViewScrollRight ( )
inline

Display the data using a view that continuously shifts data to the right, placing the newest data on the left.

◆ ViewWipeLeft()

void ScottPlot.Plottables.DataStreamer.ViewWipeLeft ( )
inline

Display the data using a view where new data overlaps old data from right to left.

◆ ViewWipeRight()

void ScottPlot.Plottables.DataStreamer.ViewWipeRight ( double  blankFraction = 0)
inline

Display the data using a view where new data overlaps old data from left to right.

Property Documentation

◆ Axes

IAxes ScottPlot.Plottables.DataStreamer.Axes = ScottPlot.Axes.Default
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.

◆ Color

Color ScottPlot.Plottables.DataStreamer.Color
getset

◆ ContinuouslyAutoscale

bool ScottPlot.Plottables.DataStreamer.ContinuouslyAutoscale = false
getset

◆ Count

int ScottPlot.Plottables.DataStreamer.Count
get

◆ CountTotal

int ScottPlot.Plottables.DataStreamer.CountTotal
get

◆ Data

DataStreamerSource ScottPlot.Plottables.DataStreamer.Data
getset

◆ HasNewData

bool ScottPlot.Plottables.DataStreamer.HasNewData
get

Returns true if data has been added since the last render.

◆ IsVisible

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

◆ Label

string ScottPlot.Plottables.DataStreamer.Label
getset

◆ LegendItems

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

Items which will appear in the legend.

Implements ScottPlot.IPlottable.

◆ LegendText

string ScottPlot.Plottables.DataStreamer.LegendText = string.Empty
getset

If populated, this text appears in the legend.

Implements ScottPlot.IHasLegendText.

◆ LineColor

Color ScottPlot.Plottables.DataStreamer.LineColor
getset

Implements ScottPlot.IHasLine.

◆ LinePattern

LinePattern ScottPlot.Plottables.DataStreamer.LinePattern
getset

Implements ScottPlot.IHasLine.

◆ LineStyle

LineStyle ScottPlot.Plottables.DataStreamer.LineStyle = new() { Width = 1 }
getset

Implements ScottPlot.IHasLine.

◆ LineWidth

float ScottPlot.Plottables.DataStreamer.LineWidth
getset

Implements ScottPlot.IHasLine.

◆ ManageAxisLimits

bool ScottPlot.Plottables.DataStreamer.ManageAxisLimits = true
getset

If enabled, axis limits will be adjusted automatically if new data runs off the screen.

Implements ScottPlot.IManagesAxisLimits.

◆ MarkerColor

Color ScottPlot.Plottables.DataStreamer.MarkerColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerFillColor

Color ScottPlot.Plottables.DataStreamer.MarkerFillColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerLineColor

Color ScottPlot.Plottables.DataStreamer.MarkerLineColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerLineWidth

float ScottPlot.Plottables.DataStreamer.MarkerLineWidth
getset

Implements ScottPlot.IHasMarker.

◆ MarkerShape

MarkerShape ScottPlot.Plottables.DataStreamer.MarkerShape
getset

Implements ScottPlot.IHasMarker.

◆ MarkerSize

float ScottPlot.Plottables.DataStreamer.MarkerSize
getset

Implements ScottPlot.IHasMarker.

◆ MarkerStyle

MarkerStyle ScottPlot.Plottables.DataStreamer.MarkerStyle = new(MarkerShape.FilledCircle, 0)
getset

Implements ScottPlot.IHasMarker.

◆ Period

double ScottPlot.Plottables.DataStreamer.Period
getset

◆ Renderer

DataViews.IDataStreamerView ScottPlot.Plottables.DataStreamer.Renderer
getset

Logic for displaying the fixed-length Y values in Data


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