-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
BUGunexpected behaviorunexpected behavior
Description
Issue:
SignalXY does sometimes not render on high density data when only partial data should be rendered due to X axis limits.

When changing the X axis limits just slightly (e.g. by panning) the signal renders fine:

The interpolation of the PointBefore results in a infinite Y value which eventually results in a overflow exception (which is handled by ScottPlot):
System.OverflowException: Overflow error.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawLines(Pen pen, PointF[] points)
at ScottPlot.Plottable.SignalPlotXYGeneric`2.Render(PlotDimensions dims, Bitmap bmp, Boolean lowQuality)
at ScottPlot.Plot.RenderPlottables(Bitmap bmp, Boolean lowQuality, Double scaleFactor)
Reproducing:
double[] ys = new double[10000];
double[] xs = ys.Select(x => double.PositiveInfinity).ToArray();
double r = 0.0;
for (int i = 0; i < ys.Length; i++)
{
r += 0.005;
xs[i] = r;
ys[i] = Math.Sin(r);
}
var signalXY = WpfPlot.Plot.AddSignalXY(xs, ys);
WpfPlot.Plot.AxisAutoY();
WpfPlot.Plot.XAxis.Dims.SetAxis(min: r - 10.0, r);
WpfPlot.Plot.Validate(deep: true);
WpfPlot.Refresh();System Details
- ScottPlot Version: 4.1.41
- Operating System: Windows 10
- Application Type: WPF
- .NET Version: .NET 6.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BUGunexpected behaviorunexpected behavior