Plotly graphs in jupyter notebooks re-render entire page html
Personne n'a encore pris cette issue.
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
When attempting to run the first graph in the getting started documents, after following the steps here, the entire page html is output ontop of the graph like in the screenshot below. This occurs for all other graphs I've tried as well.
library(plotly)
fig <- plot_ly(midwest, x = ~percollege, color = ~state, type = "box")
fig

Steps to Reproduce:
- pull the
jupyter/r-notebookdocker image from here with the commanddocker pull jupyter/r-notebook
a. This allows you to skip the "add r-kernel" steps because the R kernel is included with the r-notebook. Specifically these two lines can be skipped:
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec()
Alternatively, start with the jupyter/minimal-notebook and do the steps to add the R kernel.
- Run the docker image with
docker run -p '8888:8888' -e JUPYTER_ENABLE_LAB=yes jupyter/r-notebook - Open an R console and run
install.packages(c('repr', 'IRdisplay', 'pbdZMQ', 'devtools'))from the setup steps - Install pandoc - get to the container bash as root user. First get the container ID with
docker psthen use the ID you see there indocker exec -u root -ti <container id> bash. Runapt updatethenapt install pandoc.
a. Open the notebook from the link that step 2 output and you can verify pandoc is installed in/usr/bin/pandocby opening a terminal and navigating to the/usr/bindirectory. - Install plotly - either use the R console or the terminal. Personally, I used the terminal and ran
conda install r-plotly. I attempted with both the latest version and also withv4.9.2.2. Both showed the issue. - Once that's all setup, open an R-kernel notebook and attempt to create any plotly graph. It will initially load the graph correctly, then a few seconds later, you will see the issue from the screenshot above.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par les instructions liées de Getting started pour R-in-Jupyter et reproduisez l’exemple dans un conteneur Docker jupyter/r-notebook avec un notebook utilisant R-kernel. Comparez le rendu graphique initial avec la sortie ultérieure décrite dans l’issue ; c’est terminé lorsque les graphiques Plotly sont rendus sans ajouter l’intégralité du HTML de la page au graphique.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, jupyter-notebook, r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100