ScottPlot.NET
GitHub Repo stars

SignalXY Quickstart

SignalXY plots are a high performance plot type for X/Y data where the X values are always ascending.

This code sample is specific to ScottPlot 5 (details)
ScottPlot.Plot myPlot = new();

// generate sample data with gaps
List<double> xList = new();
List<double> yList = new();
for (int i = 0; i < 5; i++)
{
    xList.AddRange(Generate.Consecutive(1000, first: 2000 * i));
    yList.AddRange(Generate.RandomSample(1000));
}
double[] xs = xList.ToArray();
double[] ys = yList.ToArray();

// add a SignalXY plot
myPlot.Add.SignalXY(xs, ys);

myPlot.SavePng("demo.png", 400, 300);

Edit on GitHub