On 05/05/2023 6:48 a.m., Jiayue Wang wrote:> Thanks Duncan. glxgears works at the terminal; tcltk::tktoplevel()
> outputs the following:
>
> $ID
> [1] ".1"
>
> $env
> <environment: 0x55b4401d9718>
>
> attr(,"class")
> [1] "tkwin"
>
> Jiayue
But no window opens for tcltk::tktoplevel()? Sounds like R isn't seeing
your DISPLAY variable. Does Sys.getenv("DISPLAY") show the same thing
in R as you see when printing that environment variable (using e.g.
`echo $DISPLAY`) in the terminal?
Duncan Murdoch
>
> ? 5/5/23 16:45, Duncan Murdoch ??:
>> On 05/05/2023 2:24 a.m., Jiayue Wang wrote:
>>> Hi
>>>
>>> I can't get rgl working. I installed rgl, loaded it, but it
seems all
>>> plot3d codes have failed:
>>>
>>> remotes::install_github("dmurdoch/rgl")
>>> library(rgl)
>>> open3d()
>>> x <- sort(rnorm(1000))
>>> y <- rnorm(1000)
>>> z <- rnorm(1000) + atan2(x, y)
>>> plot3d(x, y, z, col = rainbow(1000))
>>>
>>> I see no plotting at all. Am I missing some important system
library or
>>> whatever? I'm using Linux Mint 23. Thanks!
>>>
>>
>> If you install the version from CRAN, do you get the same results?
>>
>> rgl needs X11 on your system.? Do other programs using it work, e.g.
try
>> running "glxgears" at the terminal, and try running
>> "tcltk::tktoplevel()" in R.
>>
>> BTW, this list isn't for contributed package support, so if it
turns out
>> that only rgl is failing, it may be best to move the discussion to
>> https://github.com/dmurdoch/rgl/issues .
>>
>> Duncan Murdoch