GitHub Repo stars

Signal DateTime

A signal plot may use DateTime units but be sure to setup the respective axis to display using DateTime format.

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

DateTime start = new(2024, 1, 1);
double[] ys = Generate.RandomWalk(200);

var sig = myPlot.Add.Signal(ys);
sig.Data.XOffset = start.ToOADate();
sig.Data.Period = 1.0; // one day between each point


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

Edit on GitHub