public void Test_MakeRational_WhenAllAreNaN() { var limits = new ScottPlot.Config.AxisLimits2D(); limits.MakeRational(); Assert.That(limits.x1 < 0); Assert.That(limits.x1 > -10); Assert.That(limits.x2 > 0); Assert.That(limits.x2 < 10); Assert.That(limits.y1 < 0); Assert.That(limits.y1 > -10); Assert.That(limits.y2 > 0); Assert.That(limits.y2 < 10); }
public void Test_MakeRational_WhenXsContainNaN() { var limits = new ScottPlot.Config.AxisLimits2D(); limits.ExpandY(-30, 40); limits.MakeRational(); Console.WriteLine(limits); Assert.That(limits.x1 < 0); Assert.That(limits.x1 > -10); Assert.That(limits.x2 > 0); Assert.That(limits.x2 < 10); Assert.That(limits.y1 == -30); Assert.That(limits.y2 == 40); }
public void Test_MakeRational_WhenYsContainNaN() { var limits = new ScottPlot.Config.AxisLimits2D(); limits.ExpandX(-10, 20); limits.MakeRational(); Console.WriteLine(limits); Assert.That(limits.x1 == -10); Assert.That(limits.x2 == 20); Assert.That(limits.y1 < 0); Assert.That(limits.y1 > -10); Assert.That(limits.y2 > 0); Assert.That(limits.y2 < 10); }