ScottPlot.NET
GitHub Repo stars

DateTime Axis Quickstart

Axis tick labels can be displayed using a time format.

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

// plot data using DateTime units
DateTime[] dates = Generate.DateTime.Days(100);
double[] ys = Generate.RandomWalk(100);
myPlot.Add.Scatter(dates, ys);

// tell the plot to display dates on the bottom axis
myPlot.Axes.DateTimeTicksBottom();

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

Edit on GitHub