Skip to content

SP5 Rotated SignalXY with Inverted YAxis #3396

@BrianAtZetica

Description

@BrianAtZetica

Issue: When I invert the Y-axis for a ScotPlot containing a rotated SignalXY I get an exception:
System.ArgumentOutOfRangeException: 'Non-negative number required. Arg_ParamName_Name'

ScottPlot Version: ScottPlot.WPF v5.0.21)

using ScottPlot;
using System.Drawing;

double[] dataX = { 1, 2, 3, 4, 5 };
double[] dataY = { 1, 4, 9, 16, 25 };

ScottPlot.Plot myPlot = new();
myPlot.Add.Scatter(dataX, dataY);
var trace = myPlot.Add.SignalXY(dataX, dataY);
trace.Data.Rotated = true;

myPlot.Axes.SetLimits(left: 0, right: 6, bottom: 26, top: 0);

myPlot.SavePng("quickstart.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