ScottPlot.NET
GitHub Repo stars

Interactive Horizontal Line Segment

Horizontal line segments can be expanded horizontally by dragging the left and right edges, or slid vertically by dragging the center line.

ScottPlot.Plot myPlot = new();

for (int i = 1; i <= 5; i++)
{
    double y = i;
    double x1 = i;
    double x2 = i * 2;
    myPlot.Add.InteractiveHorizontalLineSegment(x1, x2, y);
}

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