ScottPlot.NET
GitHub Repo stars

Interactive Trend Line

Interactive trend lines extend infinitely in both directions and can be repositioned by dragging either control point.

ScottPlot.Plot myPlot = new();

CoordinateLine line = new(1, 2, 9, 7);
myPlot.Add.InteractiveTrendLine(line);
myPlot.Axes.SetLimits(0, 10, 0, 10);

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