Package org.jamesii.gui.visualization.chart.axes

Examples of org.jamesii.gui.visualization.chart.axes.MidLogarithmicAxis


  @Override
  protected void setUp() throws Exception {
    super.setUp();

    axis = new MidLogarithmicAxis();
    assertNotNull(axis);

  }
View Full Code Here


          Math.round((Math.abs(axis.transform(5 + (i / 10d)) - 0.5))
              * roundFactor)
              / roundFactor);
    }

    axis = new MidLogarithmicAxis();
    assertNotNull(axis);

    axis.setMinimum(10);
    axis.setMaximum(60);
    assertEquals(0.5, axis.transform(35));
View Full Code Here

    // special cases
    for (int i = 0; i < 100; i++) {
      double min = Math.random() * 100000 - 50000;
      double max = Math.random() * 100000 + min;

      IAxis referenceAxis = new MidLogarithmicAxis();
      axis.setMinimumMaximum(min, max);
      axis.setLogStartPointValue((max - min) / 2 + min);

      referenceAxis.setMinimum(min);
      referenceAxis.setMaximum(max);

      for (int j = 0; j < 1000; j++) {
        double v = Math.random() * (max - min) + min;
        assertEquals(referenceAxis.transform(v), axis.transform(v), 0.00000001);
      }
    }

    for (int i = 0; i < 100; i++) {
      double min = Math.random() * 100000 - 50000;
      double max = Math.random() * 100000 + min;

      IAxis referenceAxis = new SimpleLogarithmicAxis();
      axis.setMinimumMaximum(min, max);
      axis.setLogStartPointValue(min);

      referenceAxis.setMinimum(min);
      referenceAxis.setMaximum(max);

      for (int j = 0; j < 1000; j++) {
        double v = Math.random() * (max - min) + min;
        assertEquals(referenceAxis.transform(v), axis.transform(v), 0.00000001);
      }
    }

    // small test for symmetry around the basePointValue

View Full Code Here

TOP

Related Classes of org.jamesii.gui.visualization.chart.axes.MidLogarithmicAxis

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.