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

Plots not showing in Rstudio Viewer #2353

Closed
teorems opened this issue May 18, 2024 · 6 comments
Closed

Plots not showing in Rstudio Viewer #2353

teorems opened this issue May 18, 2024 · 6 comments

Comments

@teorems
Copy link

teorems commented May 18, 2024

Hello, Since the update to the latest version of Rstudio (2024.04.1+748) (this was the case also with the second to last version), the plots are not showing in the Rstudio viewer pane. This issue does not seem to affect the rendering of rmarkdown documents, where the plots show correctly.

If, for example :

library(plotly)
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
ggpenguins <- ggplot(data = palmerpenguins::penguins) + geom_point(aes(bill_length_mm , body_mass_g, color = species))
ggplotly(ggpenguins)

Created on 2024-05-18 with reprex v2.1.0

The viewer shows up blank.

sessionInfo()
#> R version 4.4.0 (2024-04-24 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#> 
#> 
#> locale:
#> [1] LC_COLLATE=French_France.utf8  LC_CTYPE=French_France.utf8   
#> [3] LC_MONETARY=French_France.utf8 LC_NUMERIC=C                  
#> [5] LC_TIME=French_France.utf8    
#> 
#> time zone: Europe/Paris
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.10.3     digest_0.6.35     fastmap_1.2.0     xfun_0.44        
#>  [5] magrittr_2.0.3    glue_1.7.0        R.utils_2.12.3    knitr_1.46       
#>  [9] htmltools_0.5.8.1 rmarkdown_2.27    lifecycle_1.0.4   cli_3.6.2        
#> [13] R.methodsS3_1.8.2 vctrs_0.6.5       reprex_2.1.0      withr_3.0.0      
#> [17] compiler_4.4.0    R.oo_1.26.0       R.cache_0.16.0    purrr_1.0.2      
#> [21] rstudioapi_0.16.0 tools_4.4.0       evaluate_0.23     yaml_2.3.8       
#> [25] rlang_1.1.3       fs_1.6.4

Created on 2024-05-18 with reprex v2.1.0

@cpsievert
Copy link
Collaborator

cpsievert commented May 20, 2024

Hmm, I can't seem to replicate this on MacOS with RStudio Desktop (Open Source). Are you using a different flavor of RStudio (server/pro)?

Also, do you see any error logs when opening the JS console (right-click -> Inspect Element -> Console)?

Lastly, do other packages like leaflet and ggplot2 work ok?

@teorems
Copy link
Author

teorems commented May 20, 2024

  1. Normal RStudio desktop.

  2. Yes, probably :
    err1
    err2

  3. ggplot2 works fine. Leaflet no, and seems to incur into a similar kind of error.. At this point this seems more and more an Rstudio issue.

@cpsievert
Copy link
Collaborator

cpsievert commented May 20, 2024

At this point this seems more and more an Rstudio issue.

That seems very likely. It also seems likely related to your local OS/setup. If you could please file an issue in the RStudio repo with all the information they request, and also mention that neither plotly nor leaflet seems to render in the viewer, that would be much appreciated, thanks!

https://github.com/rstudio/rstudio/issues/new?assignees=&labels=bug%2Cnew&projects=&template=1_bug_report.md&title=

@sbridel
Copy link

sbridel commented May 22, 2024

Same here, polttly not showing inside R studio

@teorems
Copy link
Author

teorems commented May 22, 2024 via email

@cpsievert
Copy link
Collaborator

cpsievert commented May 22, 2024

This is likely a result of this issue with a particular combination of R+RStudio+Windows. The fix requires installing a patched version of R -- rstudio/rstudio#14603 (comment)

Closing since plotly can't do anything to make the situation better

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