How to plot a graph using R, Java and JRI?

↘锁芯ラ 提交于 2019-12-03 08:08:53

Here is how I did it: Pastebin link. Basically you need to tell the R package JavaGD that you have a JFrame available where the R plots can be displayed.

The example in the answer of @John Colby just stores the plot as a file and then displays it in Java - also an option, but a somewhat indirect way to do it.

(Unfortunately for you my code is in Scala, but as that's quite similar to Java (I translated it from Java), I hope you will be able to translate it back. I used some JRI example as a base for it, and it uses only java classes.)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!