you have to call the setView method of projection:
Plot3DPanel p = new Plot3DPanel();
for (int i = 0; i < 3; i++) {
double[][] XYZ = new double[10][3];
for (int j = 0; j < XYZ.length; j++) {
XYZ[j][0] = /*1 +*/Math.random();
XYZ[j][1] = /*100 **/Math.random();
XYZ[j][2] = /*0.0001 **/Math.random();
}
p.addScatterPlot("toto" + i, XYZ);
}
p.setLegendOrientation(PlotPanel.SOUTH);
((Projection3D)p.plotCanvas.draw.projection).setView(theta, phi);
new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
but for now it's impossible because plotCanvas.draw.projection is not public access.
So you have to change it (maybe better with get/set).
Yann
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
does anybody know how to set manually the view (XY, XZ, etc.) in the 3DPlotPanel??
Hi,
you have to call the setView method of projection:
Plot3DPanel p = new Plot3DPanel();
for (int i = 0; i < 3; i++) {
double[][] XYZ = new double[10][3];
for (int j = 0; j < XYZ.length; j++) {
XYZ[j][0] = /*1 +*/Math.random();
XYZ[j][1] = /*100 **/Math.random();
XYZ[j][2] = /*0.0001 **/Math.random();
}
p.addScatterPlot("toto" + i, XYZ);
}
p.setLegendOrientation(PlotPanel.SOUTH);
((Projection3D)p.plotCanvas.draw.projection).setView(theta, phi);
new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
but for now it's impossible because plotCanvas.draw.projection is not public access.
So you have to change it (maybe better with get/set).
Yann