GitHub Repo stars

Legend Outside the Plot

Use the ShowLegend() overload that accepts an Edge to display the legend outside the data area.

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

var sig1 = myPlot.Add.Signal(Generate.Sin());
var sig2 = myPlot.Add.Signal(Generate.Cos());

sig1.LegendText = "Sine";
sig2.LegendText = "Cosine";


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

Edit on GitHub