Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view(map) does not generate image in R studio #41

Closed
rpresler opened this issue Feb 22, 2021 · 10 comments
Closed

view(map) does not generate image in R studio #41

rpresler opened this issue Feb 22, 2021 · 10 comments

Comments

@rpresler
Copy link

rpresler commented Feb 22, 2021

R studio 1.3.1093 (Win10)
R 4.0.3

plot(map) gives a fine image in R studio
view(map) fails to render image of map in R studio
view(map) successfully gives image in web browser, but only when using R command-line

@shwilks
Copy link
Member

shwilks commented Feb 23, 2021

Thanks for the issue report, when you run view(map) in Rstudio do you just get a blank white image or nothing at all? If you right click on the Rstudio viewer and do inspect element, do you get any errors popping up in the javascript console? and if you click the show in new window options on the rstudio viewer to open things up in the web browser does it then work again, similar to from the command line? It sounds like it's a specific incompatibility with the browser Rstudio uses for the viewer I guess?

@rpresler
Copy link
Author

rpresler commented Feb 23, 2021 via email

@shwilks
Copy link
Member

shwilks commented Feb 25, 2021

Thanks Rob, that's really helpful, so yeah it seems like it's a problem with the particular browser RStudio uses, which is somehow not quite the same as the standard web browsers somehow, this sort of difference has occasionally popped up before but only in minor things like different defaults it uses text font styles and things like that.

It's a bit tricky to debug without being able to reproduce the problem but I'm working on getting a windows installation I can test stuff like this on. Do you happen to know if this is a general RStudio in Windows problem or more specific for your installation? Since it seems to be RStudio browser specific I guess it might be worth updating to the latest windows version and seeing if that makes any difference? One thing I can try my end is updating the threejs library it uses to the latest version, but I worry the problem might be more fundamental like the RStudio windows browser does not support WebGL for 3D rendering..

As a side note, on the mac at least there is an option for opening up a new Rstudio viewer window, but also a separate option for opening the viewer up in a webpage. If indeed there is something like that, that might be a slightly less annoying work around for now than having to run it from the command line.

@shwilks
Copy link
Member

shwilks commented Feb 25, 2021

hmm, according to this discussion, which seems like it may be somewhat related because I think the issue is with establishing a webgl rendering context, there are some settings you can fiddle with, and perhaps indeed there is some issue that has been fixed in later RStudio versions?

https://community.rstudio.com/t/webgl-is-not-supported-by-your-browser-plotly/13962

@shwilks
Copy link
Member

shwilks commented Feb 25, 2021

and this looks like it may be exactly the same sort of issue..

rstudio/rstudio#5678

@rpresler
Copy link
Author

rpresler commented Feb 25, 2021 via email

@shwilks
Copy link
Member

shwilks commented Feb 26, 2021

No problem! I'll leave this issue open in case you come across any solutions you want to post here, it'd be great to know if you find anything to fix it, certainly having to choose between seeing the viewer or your code seems er sub-optimal.. :D

@davipatti
Copy link
Member

FYI I just tried this on windows 10 and view works ok

Rstudio 1.4.1103
R 4.0.3

@rpresler
Copy link
Author

rpresler commented Mar 1, 2021 via email

@davipatti
Copy link
Member

That's great rob. I'll close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants