[graalvm-users] Running ggplot2 from Interop
Stepan
stepan.sindelar at oracle.com
Wed Aug 1 07:16:00 PDT 2018
Another thing is that ggplot2 plots must be printed to actually show
them, so:
print(ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point())
if you want to build the plot dynamically (not tested):
g <- ggplot(mtcars, aes(x=wt, y=mpg)
g <- g + geom_point()
print(g)
Stepan
On 01/08/18 16:01, Roland Schatz wrote:
> I stumbled over this as well in the past:
>
> When you run R code via `Polyglot.eval`, you're in non-interactive mode
> (similar to the `Rscript` command), so the output device defaults to svg
> (I think).
> Just add an "awt()" call to your script, and it should work.
>
> - Roland
>
> On 08/01/2018 02:56 PM, Rodrigo Botafogo wrote:
>> Hello...
>>
>> ggplot works fine in FastR, but if I try:
>>
>> Polyglot.eval("R", <<-R)
>> library('ggplot2')
>> ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point()
>> R
>>
>> nothing happens... the code executes and exits, but no graphics. How
>> should this be done?
>>
>>
>>
>> --
>> Rodrigo Botafogo
>>
>>
>>
>> _______________________________________________
>> GraalVM-Users mailing list
>> GraalVM-Users at oss.oracle.com
>> https://oss.oracle.com/mailman/listinfo/graalvm-users
>
>
>
>
> _______________________________________________
> GraalVM-Users mailing list
> GraalVM-Users at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/graalvm-users
>
More information about the GraalVM-Users
mailing list