Skip to content

SignalXY: step mode has incorrect off-screen interpolation #3894

@seishinkouki

Description

@seishinkouki

Issue: (Describe the bug here)
Incorrect rendering of points near the left axis in SignalXY plots with "ConnectStyle.StepHorizontal"

The following gif shows the actual appearance
scottplot

ScottPlot Version: (What NuGet package are you using?)
ScottPlot.Avalonia 5.0.34
Code Sample: See http://scottplot.net/faq/repro/ for tips about creating reproducible code samples

 AvaPlot avaPlot1 = this.Find<AvaPlot>("AvaPlot1");
 int[] xdata = new int[50];
 int[] ydata = new int[50];

 Random randNum = new Random();
 for (int i = 0; i < ydata.Length; i++)
 {
     xdata[i] = i;
     ydata[i] = randNum.Next(0, 2);
 }
 var abc = avaPlot1.Plot.Add.SignalXY(xdata, ydata);
 abc.ConnectStyle = ConnectStyle.StepHorizontal;
 avaPlot1.Refresh();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions