ScottPlot.NET
SignalConst plots pre-processes data to render much faster than Signal plots. Pre-processing takes time up-front and requires 4x the memory of Signal.
  • This page contains recipes for the SignalConst category.
  • Visit the Cookbook Home Page to view all cookbook recipes.
  • Generated by ScottPlot 4.1.67 on 8/13/2023

SignalConst Quickstart

SignalConst plots pre-processes data to render much faster than Signal plots. Pre-processing takes a little time up-front and requires 4x the memory of Signal.

var plt = new ScottPlot.Plot(600, 400);

double[] values = DataGen.RandomWalk(1_000_000);
plt.AddSignalConst(values);
plt.Title("One Million Points");
plt.Benchmark();

plt.SaveFig("signalconst_quickstart.png");

Generic Data Type

SignalConst supports other data types beyond just double arrays. You can use this plot type to display data in any numerical format that can be cast to a double.

var plt = new ScottPlot.Plot(600, 400);

int[] data = { 2, 6, 3, 8, 5, 6, 1, 9, 7 };
plt.AddSignalConst(data);
plt.Title("SignalConst Displaying int[] Data");

plt.SaveFig("signalconst_generic.png");

SignalConst Data Updates

SignalConst is fast because it pre-processes data, but changing data requires additional processing before it can be rendered properly. Use the SignalPlot’s Update() function to update data values instead of modifying contents of the original array that was used to create the signal plot.

var plt = new ScottPlot.Plot(600, 400);

double[] values = DataGen.Sin(51);
var sig = plt.AddSignalConst(values);

// update a single point
sig.Update(20, 3);

// update a small range of values
double[] newYs = { 4, 3, 2, 1 };
sig.Update(30, newYs);

plt.SaveFig("signalconst_update.png");