Erebus
Erebus

Reputation: 141

Plotly plot does not render in viewer pane

Trying to use plotl_ly() in Rstudio and it refuses to render in the viewer pane as expected.

Tried uninstalling plotly, R and Rstudio and the problem persists. Anyone else have the same problem?

Tried running a minimal example like so and I get a white screen in my viewer pane instead of a plot.

library(plotly)

plot_ly(x = 1:10, y = 1:10)

Here is my session info:

R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=English_Canada.utf8  LC_CTYPE=English_Canada.utf8    LC_MONETARY=English_Canada.utf8
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.utf8    

time zone: America/Toronto
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] plotly_4.10.4 ggplot2_3.5.1

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       httr_1.4.7        cli_3.6.2         rlang_1.1.3       purrr_1.0.2      
 [6] generics_0.1.3    jsonlite_1.8.8    data.table_1.15.4 glue_1.7.0        colorspace_2.1-0 
[11] htmltools_0.5.8.1 scales_1.3.0      fansi_1.0.6       grid_4.4.0        crosstalk_1.2.1  
[16] munsell_0.5.1     tibble_3.2.1      fastmap_1.1.1     yaml_2.3.8        lifecycle_1.0.4  
[21] compiler_4.4.0    dplyr_1.1.4       htmlwidgets_1.6.4 pkgconfig_2.0.3   tidyr_1.3.1      
[26] rstudioapi_0.16.0 digest_0.6.35     viridisLite_0.4.2 R6_2.5.1          tidyselect_1.2.1 
[31] utf8_1.2.4        pillar_1.9.0      magrittr_2.0.3    withr_3.0.0       tools_4.4.0      
[36] gtable_0.3.5      lazyeval_0.2.2   

Upvotes: 5

Views: 1105

Answers (1)

Erebus
Erebus

Reputation: 141

User @sactyr's comment

This issue has been recently fixed, happens in RStudio when using R version 4.4.0 with all plot and HTML objects. See the issue here. Looks like issue is fixed by installing patched build.

solved my issue. Installing the unofficial patched build brings back plotly to the viewer pane. Seems like the issue is indeed related to R version 4.4.0.

Upvotes: 5

Related Questions