google-code-export / rcaller

Automatically exported from code.google.com/p/rcaller
Other
1 stars 0 forks source link

Is it possible to plot a 3D graphic using rcaller? #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This is the code that I am trying to run.

        RCaller caller = new RCaller();
        Globals.detect_current_rscript();
        caller.setRscriptExecutable(Globals.Rscript_current);
        caller.setGraphicsTheme(new DefaultTheme());

        RCode code = new RCode();
        code.clear();

        double[] y = new double[]{1, 4, 3, 5, 6, 10};
        double[] x = new double[]{3, 6, 5, 9, 8, 13};
        double[] z = new double[]{2, 3, 1, 7, 8, 18};

        code.addDoubleArray("x", x);
        code.addDoubleArray("y", y);
        code.addDoubleArray("z", z);
        code.R_require("rgl");
        code.addRCode("plot3d(x,y,z)");
        code.endPlot();

        caller.setRCode(code);
        File file = code.startPlot();
        caller.runOnly();

What is the expected output? What do you see instead?

When I use a simple graphic for example scatterplot it plot the graphic 
perfect, but when I try to plot the plot3d it just show me the graphic for a 
few seconds and then it disappears. 

What version of the product are you using? On what operating system?
I am using the 2.2 rcaller, on windows 7 64 bits and R - 3.1.0

Please provide any additional information below.

This problem only happend when I tried to plot 3D chart. What happend is that I 
can see the window showing the chart but after 1 second it disappears the R 
panel and open a Java panel empty.

Thanks.

Original issue reported on code.google.com by lucas250...@gmail.com on 21 May 2014 at 11:36