Examples of Plot3DPanel


Examples of guicomponents.Plot3DPanel

  public CompRepAnd2DAnd3DAndTableOptions(String labelFreq, String label3DPlot, String labelTabel) {
   
      
    compRepPanel = new CompRepRadioButtonsPanel();
    p2dPanel = new Plot2DPanel(labelFreq);
    p3dPanel = new Plot3DPanel(label3DPlot);
    tabOptPanel = new TableOptionsPanel(labelTabel);
       
        gbl = new GridBagLayout();
        this.setLayout(gbl);
       
View Full Code Here

Examples of org.math.plot.Plot3DPanel

  /*
   * MAIN METHOD(for testing)
   */

  public static void main(String[] args) {
    Plot3DPanel p = new Plot3DPanel();
    Object[][] XYZ = new Object[8][3];
    Object[][] XYZ2 = new Object[10][3];

    for (int j = 0; j < XYZ.length; j++) {
      XYZ[j][0] = Math.random();
      XYZ[j][1] = Math.random();
      XYZ[j][2] = "" + ((char) ('a' + j));
    }

    for (int j = 0; j < XYZ2.length; j++) {
      XYZ2[j][0] = Math.random();
      XYZ2[j][1] = Math.random();
      XYZ2[j][2] = "" + ((char) ('a' + j));
    }

    p.addScatterPlot("toto", p.mapData(XYZ));
    p.addScatterPlot("toti", p.mapData(XYZ2));
    p.setAxisScale(1, "log");

    new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    HashMap<String, Double> arg = p.getAxis(2).getStringMap();
    Collection<Double> ouch = arg.values();
    Iterator<Double> it = ouch.iterator();
    while (it.hasNext()) {
      System.out.println(it.next());
    }
View Full Code Here

Examples of org.math.plot.Plot3DPanel

    }
    return null;
  }

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

    //triangular random cloud (as sum of two uniform random numbers)
    double[][] cloud = new double[100][3];
    for (int i = 0; i < cloud.length; i++) {
      cloud[i][0] = Math.random() + Math.random();
      cloud[i][1] = Math.random() + Math.random();
      cloud[i][2] = Math.random() + Math.random();
    }
    p.addCloudPlot("cloud", Color.RED, cloud, 3, 3, 3);

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

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

Examples of org.math.plot.Plot3DPanel

   * @return A named component suitable for adding to dialog.
   */
  private NamedComponent create3DStatsPlot(String suffix,
      WWZCoordinateType xType, WWZCoordinateType yType,
      WWZCoordinateType zType, List<WWZStatistic> stats) {
    Plot3DPanel plot = new Plot3DPanel();
    plot
        .setAxisLabels(xType.toString(), yType.toString(), zType
            .toString());

    int size = stats.size();
    double[][] xyz = new double[3][size];

    for (int i = 0; i < size; i++) {
      WWZStatistic stat = stats.get(i);
      xyz[0][i] = stat.getValue(xType);
      xyz[1][i] = stat.getValue(yType);
      xyz[2][i] = stat.getValue(zType);
    }

    plot.addBarPlot(LocaleProps.get("WWZ_STATISTICS_3D_PLOT"), Color.GREEN,
        xyz);

    String name = yType.toString() + " " + LocaleProps.get("VERSUS") + " "
        + xType.toString() + " " + LocaleProps.get("VERSUS") + " "
        + zType.toString() + " 3D " + suffix;
View Full Code Here

Examples of org.math.plot.Plot3DPanel

    }
    return null;
  }
       
        public static void main(String[] args) {
    Plot3DPanel plotpanel = new Plot3DPanel();
    for (int i = 0; i < 1; i++) {
      double[][] receiverXYZ = new double[100][6];
      for (int j = 0; j < receiverXYZ.length; j++) {
        receiverXYZ[j][0] = /*1 + */Math.random();
        receiverXYZ[j][1] = /*100 * */Math.random();
                                receiverXYZ[j][2] = /*100 * */Math.random();
                                receiverXYZ[j][3] = /*1 + */Math.random()/10;
        receiverXYZ[j][4] = /*100 * */Math.random()/10;
                                receiverXYZ[j][5] = /*100 * */Math.random()/10;
      }
      int receiverPlotDataIndex = plotpanel.addBoxPlot("Receivers", Color.orange, receiverXYZ);
    }

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

Examples of scalaSci.math.plot.Plot3DPanel

  /*
   * MAIN METHOD(for testing)
   */

  public static void main(String[] args) {
    Plot3DPanel p = new Plot3DPanel();
    Object[][] XYZ = new Object[8][3];
    Object[][] XYZ2 = new Object[10][3];

    for (int j = 0; j < XYZ.length; j++) {
      XYZ[j][0] = Math.random();
      XYZ[j][1] = Math.random();
      XYZ[j][2] = "" + ((char) ('a' + j));
    }

    for (int j = 0; j < XYZ2.length; j++) {
      XYZ2[j][0] = Math.random();
      XYZ2[j][1] = Math.random();
      XYZ2[j][2] = "" + ((char) ('a' + j));
    }

    p.addScatterPlot("toto", p.mapData(XYZ));
    p.addScatterPlot("toti", p.mapData(XYZ2));
    p.setAxisScale(1, "log");
                p.setAxisLabel(0, "Axis 0");
                p.setAxisLabels("sterg X", "sterg Y", "sterg Z");

    new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    HashMap<String, Double> arg = p.getAxis(2).getStringMap();
    Collection<Double> ouch = arg.values();
    Iterator<Double> it = ouch.iterator();
    while (it.hasNext()) {
      System.out.println(it.next());
    }
View Full Code Here

Examples of scalaSci.math.plot.Plot3DPanel

    return null;
  }

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

    //triangular random cloud (as sum of two uniform random numbers)
    double[][] cloud = new double[1000][3];
    for (int i = 0; i < cloud.length; i++) {
      cloud[i][0] = Math.random() + Math.random();
      cloud[i][1] = Math.random() + Math.random();
      cloud[i][2] = Math.random() + Math.random();
    }
    p.addCloudPlot("cloud", Color.RED, cloud, 3, 3, 3);

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

    p.setLegendOrientation(PlotPanel.SOUTH);
    new FrameView(p).setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
  }
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.