1:import org.jmathplot.gui.*;
2:
3:/**
4: * <p>Copyright : BSD License</p>
5: * @author Yann RICHET
6: * @version 1.0
7: */
8:
9:public class Simple3DScatterPlot {
10: public static void main(String[] args) {
11:
12: // Build a random 3D data set
13: double[][] datas = new double[10][3];
14:
15: for (int i = 0; i < datas.length; i++) {
16: for (int j = 0; j < datas[0].length; j++) {
17: datas[i][j] = Math.random();
18: }
19: }
20:
21: // Build the 3D scatterplot of the datas in a Panel
22: Plot3DPanel plot3d = new Plot3DPanel(datas,"datas","SCATTER");
23:
24: // Display a Frame containing the plot panel
25: new FrameView(plot3d);
26:
27: }
28:}
