plotly / plotly/plotly.R

Plotly graphs in jupyter notebooks re-render entire page html

Aperta
#1,950 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
R
Stelle
2.7k
Fork
641
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

image


Steps to Reproduce:

  1. pull the jupyter/r-notebook docker image from here with the command docker 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.

  1. Run the docker image with docker run -p '8888:8888' -e JUPYTER_ENABLE_LAB=yes jupyter/r-notebook
  2. Open an R console and run install.packages(c('repr', 'IRdisplay', 'pbdZMQ', 'devtools')) from the setup steps
  3. Install pandoc - get to the container bash as root user. First get the container ID with docker ps then use the ID you see there in docker exec -u root -ti <container id> bash. Run apt update then apt install pandoc.
    a. Open the notebook from the link that step 2 output and you can verify pandoc is installed in /usr/bin/pandoc by opening a terminal and navigating to the /usr/bin directory.
  4. 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 with v4.9.2.2. Both showed the issue.
  5. 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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con le istruzioni collegate di Getting started per R-in-Jupyter e riproduci l’esempio in un container Docker jupyter/r-notebook usando un notebook con R-kernel. Confronta il rendering iniziale del grafico con l’output successivo descritto nell’issue; il lavoro è completato quando i grafici Plotly vengono renderizzati senza aggiungere l’intero HTML della pagina al grafico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, jupyter-notebook, r
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.