Package org.math.plot

Examples of org.math.plot.Plot2DPanel


  public double[][] getData() {
    return new double[][] { Q };
  }

  public static void main(String[] args) {
    Plot2DPanel p2 = new Plot2DPanel();
    for (int i = 0; i < 1; i++) {
      double[][] XYZ = new double[10][2];
      for (int j = 0; j < XYZ.length; j++) {
        XYZ[j][0] = /*1 + */Math.random();
        XYZ[j][1] = /*100 * */Math.random();
      }
      p2.addScatterPlot("toto" + i, XYZ);
    }
    p2.addQuantiletoPlot(0, 1, 1.0, true, 0.2);
    new FrameView(p2).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
View Full Code Here


  public double[][] getData() {
    return null;//new double[][] { sigma };
  }

  public static void main(String[] args) {
    Plot2DPanel p2 = new Plot2DPanel();
    for (int i = 0; i < 2; i++) {
      double[][] XYZ = new double[10][2];
      for (int j = 0; j < XYZ.length; j++) {
        XYZ[j][0] = /*1 + */Math.random();
        XYZ[j][1] = /*100 * */10 * Math.random();
      }

      p2.addScatterPlot("toto" + i, XYZ);
    }
    p2.getPlot(0).addQuantiles(1, new double[] {/*-3,-2,*/-4, -2, -0.5, 0, 0.5, 2, 4 /*,2,3*/});
    p2.getPlot(1).addQuantiles(1, new double[] { -3, -2, -1, 0, 1, 2, 3 });
    //p2.getPlot(1).addLayer(new DensityLayerPlot(p2.getPlot(1), 1, new double[] { -.1, 0, .1 }));

    new FrameView(p2).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
View Full Code Here

    }
    return null;
  }

  public static void main(String[] args) {
    Plot2DPanel p = new Plot2DPanel();

    double[][] cloud = new double[100][2];
    for (int i = 0; i < cloud.length; i++) {
      cloud[i][0] = Math.random() + Math.random();
      cloud[i][1] = Math.random() + Math.random();
    }
    p.addCloudPlot("cloud", Color.RED, cloud, 5, 5);

    double[][] cloud2 = new double[100][2];
    for (int i = 0; i < cloud2.length; i++) {
      cloud2[i][0] = 2 + Math.random() + Math.random();
      cloud2[i][1] = 2 + Math.random() + Math.random();
    }
    p.addCloudPlot("cloud2", Color.RED, cloud2, 5, 5);

    p.setLegendOrientation(PlotPanel.SOUTH);
    new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
View Full Code Here

  }

  public static void main(String[] args) {
    double[] sXYZ = null;

    Plot2DPanel p2 = new Plot2DPanel();
    for (int i = 0; i < 2; i++) {
      double[][] XYZ = new double[10][2];
      sXYZ = new double[10];
      for (int j = 0; j < XYZ.length; j++) {
        XYZ[j][0] = /*1 + */Math.random();
        XYZ[j][1] = /*100 * */Math.random();
        sXYZ[j] = /*100 * */Math.random();
      }

      p2.addScatterPlot("toto" + i, XYZ);
    }
    p2.getPlot(0).addGaussQuantiles(0, sXYZ);
    p2.getPlot(1).addGaussQuantiles(1, 0.1);

    new FrameView(p2).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
View Full Code Here

    this.drawGraph(x,y);
  }
 
  private void drawGraph(double[] x, double[] y)
  {
    this.plot = new Plot2DPanel();
    this.plot.addLegend(la.getText("graph_game"));
    this.plot.addLinePlot(la.getText("graph_sq"), x, y);
View Full Code Here

    for(int i = 0; i < size; i++) {
      X[i] = time.get(i);
      Y[i] = concurrency.get(i);
    }
   
    Plot2DPanel plot = new Plot2DPanel();
    plot.addStaircasePlot("Concurrency vs Time", X, Y);
    plot.setAxisLabels("Time", "Active threads");
    this.setContentPane(plot);
    this.setVisible(true);
 
View Full Code Here

TOP

Related Classes of org.math.plot.Plot2DPanel

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.