Skip to content

Crash when rendering SignalXY if using InvertX() and some equal X values #4313

@lguelat

Description

@lguelat

Issue: Rendering SignalXY plots will crash when using InvertX() with specific conditions: data conains same X value more than twice. The very same data sample will render correctly using InvertX with ScatterLines.

ScottPlot Version: 5.0.39

Code Sample:

ScottPlot.Plot myPlot = new();
//myPlot.Add.SignalXY([0d, 1, 1], [4d, 4, 6]); // this is fine
myPlot.Add.SignalXY([0d, 1, 1, 1], [4d, 8, 4, 6]); // this causes crash on render
myPlot.Axes.InvertX();
myPlot.SavePng("InvertX_bug.png", 400, 300);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions