Re: [R] rgl not plotting properly

2023-05-05 Thread Jiayue Wang




在 5/5/23 21:08, Duncan Murdoch 写道:

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


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.




Thanks all the same, Duncan!

Jiayue

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] rgl not plotting properly

2023-05-05 Thread Duncan Murdoch

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


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

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] rgl not plotting properly

2023-05-05 Thread Jiayue Wang




在 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


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"

Jiayue


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




__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] rgl not plotting properly

2023-05-05 Thread 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


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


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] rgl not plotting properly

2023-05-05 Thread Jiayue Wang
Thanks Duncan. glxgears works at the terminal; tcltk::tktoplevel() 
outputs the following:


$ID
[1] ".1"

$env


attr(,"class")
[1] "tkwin"

Jiayue

在 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


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] rgl not plotting properly

2023-05-05 Thread 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

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rgl not plotting properly

2023-05-05 Thread Jiayue Wang

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!


Thanks,
Jiayue

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.