0

I was using JRI to plot a graph in JSP. If I use the below code, it works fine.

Rengine re = new Rengine (new String [] {"--vanilla"}, false, null);
re.eval("jpeg('<filename>')";
re.eval("plot(x,y)");
re.eval("dev.off()");

Instead if I use dotplot, the jpeg file is not getting generated.

Rengine re = new Rengine (new String [] {"--vanilla"}, false, null);
re.eval("jpeg('<filename>')";
re.eval("library(\"lattice\")");
re.eval("dotplot(y~x)");
re.eval("dev.off()");

In the above case the "< filename >" won't be created. Same issue if I use "ggplot" after importing the library. Please suggest on the same.

Ashish Anand
  • 3,531
  • 6
  • 34
  • 45

0 Answers0