ScottPlot.NET
GitHub Repo stars

Axis Line with Limits

Axis lines extend infinitely in both directions by default, but upper and lower limits may be specified to limit the dimensions of axis lines.

ScottPlot.Plot myPlot = new();

myPlot.Add.Signal(Generate.Sin());
myPlot.Add.Signal(Generate.Cos());

var vLine = myPlot.Add.VerticalLine(24);
vLine.Minimum = -.5;
vLine.Maximum = 0.5;

var hLine = myPlot.Add.HorizontalLine(0.73);
hLine.Minimum = 10;
hLine.Maximum = 40;

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