Skip to content

Problems with plt.AxisAuto() and negative numbers  #1855

@CarloToso

Description

@CarloToso

Bug Report

Issue: Data points with negative values go out of bounds with AxisAuto().

test

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace App
{
    public class Program
    {
        public static void Main()
        {
        double[] dataX = new double[] { -1000, -2000, 5000, -400, 200 };
        double[] dataY = new double[] { 1, 4, 9, 16, 25 };
        var plt = new ScottPlot.Plot(1280, 960);
        plt.AddLollipop(dataX, dataY);
        plt.SaveFig("test.jpeg");
        }
    }
}

System Details

  • ScottPlot Version: 4.1.45
  • Operating System: Windows 10
  • Application Type: console
  • .NET Version: NET Framework 4.61, Net5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions