ScottPlot.NET
GitHub Repo stars

Removing all Plottables of a Type

All plottables of a given type may be removed from a plot with a single command.

ScottPlot.Plot myPlot = new();

myPlot.Add.Scatter(Generate.Consecutive(51), Generate.Sin(51));
myPlot.Add.Signal(Generate.Cos());
myPlot.Add.HorizontalLine(0.75);

// remove every instance of a specific plottable type
myPlot.Remove<ScottPlot.Plottables.Signal>();

myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Plottable Management category