[R] rgl not plotting properly
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Fri May 5 15:08:55 CEST 2023
On 05/05/2023 7:41 a.m., Jiayue Wang wrote:
>
>
> 在 5/5/23 19:15, Duncan Murdoch 写道:
>> 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?
>
> Oh yes, a window did open for tcltk::tktoplevel(), I forgot to mention
> it, sorry.
> With Sys.getenv("DISPLAY"), I got
>
> [1] ":0"
In that case, it sounds like it's purely an rgl issue, but I don't
really have anything else to suggest about how to fix it. There is a
workaround: Run the `rglwidget()` function whenever you want to see a
plot, and it should open in your browser.
Duncan Murdoch
More information about the R-help
mailing list