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

Examples of org.jamesii.gui.visualization.chart.axes.IAxis.transform()


      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;
View Full Code Here


      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

    if (vTicks != null && vAxis != null) {
      g.setColor(Color.LIGHT_GRAY);
      g.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT,
          BasicStroke.JOIN_BEVEL, 0, new float[] { 3, 3 }, 0));
      for (Double d : vTicks) {
        double v = vAxis.transform(d) * plotDimension.getHeight();
        g.drawLine(plotOrigin.x,
            (int) (plotOrigin.y + plotDimension.height - v), plotOrigin.x
                + plotDimension.width, (int) (plotOrigin.y
                + plotDimension.height - v));
      }
View Full Code Here

    IAxis yAxis = getAxis(this.getAxisForGroup(yGroup));

    double x = getModel().getValue(series, 0, valueIndex).doubleValue();
    double y = getModel().getValue(series, 1, valueIndex).doubleValue();

    return new Point2D.Double(xAxis.transform(x), yAxis.transform(y));
  }

  // TODO sr137: optimize
  @Override
  public Dimension getPlotDimension(Graphics2D g, int x, int y, int width,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.