ScottPlot.NET
GitHub Repo stars

Marker Legend

Markers with labels appear in the legend.

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

var sin = myPlot.Add.Signal(Generate.Sin());
sin.Label = "Sine";

var cos = myPlot.Add.Signal(Generate.Cos());
cos.Label = "Cosine";

var marker = myPlot.Add.Marker(25, .5);
marker.Label = "Marker";
myPlot.ShowLegend();

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

Edit on GitHub