Rif.jl icon indicating copy to clipboard operation
Rif.jl copied to clipboard

ggplot2 doesn't open a graphic windows

Open diegozea opened this issue 12 years ago • 3 comments

But, plot() works fine:

julia> using Rif

julia> initr()
Using R_HOME=/usr/lib/R
0

julia> R("library(ggplot2)")
RArray{ASCIIString,1}(Ptr{Void} @0x0000000006a3b8f8)

julia> R("qplot(1:4,1:4,geom=\"point\")")
RArray{Sexp,1}(Ptr{Void} @0x0000000006ffefe0)

diegozea avatar May 22 '13 17:05 diegozea

I don't have access to a recent install of Julia+Rif when writing this. This might be because R is in "non-interactive" mode, and then the plot are created in a file located in the current working directory. R("dev.off()") would then be needed to ensure that the file is complete.

lgautier avatar May 29 '13 12:05 lgautier

Calling dev.off() gives an error and Julia crashes after that:

julia> R("dev.off()")
Error en dev.off() : cannot shut down device 1 (the null device)

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 2
dzea@deepthought:~$ 

There isn't not new file on the working directory.

diegozea avatar May 29 '13 14:05 diegozea

Try this

R("print(qplot(1:4,1:4,geom=\"point\"))")

But I think there is still another problem here. I am using Mac, and the quartz window freezes when I plot, doesn't matter plot or qplot.

randy3k avatar May 07 '14 06:05 randy3k