-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
BUGunexpected behaviorunexpected behavior
Description
Hi Scott, thank you for this great library!
Bug Report
Issue: (Bug description goes here)
SetAxisLimits accepts AxisLimits with max values less then min values, the generated plot is invalid
Reproducing: (What do others have to do to reproduce the bug?)
Generate the plot
OHLC[] ohcls = DataGen.RandomStockPrices(null, 100);
candlePlot = formsPlot1.Plot.AddCandlesticks(ohcls);
candlePlot.Sequential = true;
Works as expected
var al = new AxisLimits(0, 100, 150, 400);
formsPlot1.Plot.SetAxisLimits(al);
formsPlot1.RenderRequest();
formsPlot1.Plot.SaveFig("a.png");
yMax < yMin
var al = new AxisLimits(0, 100, 400, 150);
formsPlot1.Plot.SetAxisLimits(al);
formsPlot1.RenderRequest();
formsPlot1.Plot.SaveFig("b.png");
xMax < xMin
var al = new AxisLimits(100, 0, 150, 400);
formsPlot1.Plot.SetAxisLimits(al);
formsPlot1.RenderRequest();
formsPlot1.Plot.SaveFig("c.png");
Expected Behavior
SetAxisLimits throws ArgumentException
System Details
- ScottPlot Version: 4.1.60
- Operating System: Windows 10
- Application Type: WinForms
- .NET Version: .Net 7.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BUGunexpected behaviorunexpected behavior


