dashR
dashR copied to clipboard
Using ggplotly in a JupyterLab notebook causes Safari crash
The problem appears on Safari 13.0.3 on macOS 10.15.1 (Catalina) but interestingly does NOT occur on Chrome Version 78.0.3904.108. Possibly related to this issue ?
Here's a video of the problem in action (the plot actually flashes):

Here's the code to cause the crash (actually most plots have this behaviour). Just copy this into a JupyterLab notebook and run the cell:
options(tidyverse.quiet = TRUE,
repr.plot.width = 5,
repr.plot.height = 3)
library(tidyverse)
library(plotly)
# Let's load up a familiar dataset: mtcars
head(mtcars)
p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
geom_smooth() +
theme_bw() +
labs(x='Weight (/1000 lbs)',
y='Fuel efficiency (mpg)',
title='Car Fuel efficiency by weight')
p
ggplotly(p)
R sessionInfo() :
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotly_4.9.1 ggplot2_3.2.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 later_1.0.0 pillar_1.4.2 compiler_3.6.1
[5] base64enc_0.1-3 tools_3.6.1 zeallot_0.1.0 digest_0.6.23
[9] uuid_0.1-2 viridisLite_0.3.0 jsonlite_1.6 evaluate_0.14
[13] lifecycle_0.1.0 tibble_2.1.3 gtable_0.3.0 pkgconfig_2.0.3
[17] rlang_0.4.2 shiny_1.2.0 IRdisplay_0.7.0 crosstalk_1.0.0
[21] yaml_2.2.0 IRkernel_1.0.1 repr_1.0.1 withr_2.1.2
[25] dplyr_0.8.3 httr_1.4.1 htmlwidgets_1.5.1 vctrs_0.2.0
[29] grid_3.6.1 tidyselect_0.2.5 glue_1.3.1 data.table_1.12.6
[33] R6_2.4.1 pbdZMQ_0.3-3 farver_2.0.1 purrr_0.3.3
[37] tidyr_1.0.0 magrittr_1.5 promises_1.1.0 backports_1.1.5
[41] scales_1.1.0 htmltools_0.4.0 assertthat_0.2.1 xtable_1.8-4
[45] mime_0.7 colorspace_1.4-1 httpuv_1.5.2 labeling_0.3
[49] lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4
and jupyter --version:
jupyter core : 4.6.1
jupyter-notebook : 6.0.1
qtconsole : 4.5.1
ipython : 6.2.1
ipykernel : 5.1.1
jupyter client : 5.3.4
jupyter lab : 1.2.3
nbconvert : 5.5.0
ipywidgets : 7.5.0
nbformat : 4.4.0
traitlets : 4.3.2