plotly / plotly/plotly.R

Plotly graphs in jupyter notebooks re-render entire page html

Đang mở
#1,950 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
R
Star
2.7k
Fork
641
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với các hướng dẫn Getting started về R-in-Jupyter được liên kết và tái hiện ví dụ trong một container Docker jupyter/r-notebook bằng notebook sử dụng R-kernel. So sánh cách kết xuất biểu đồ ban đầu với đầu ra được mô tả sau đó trong issue; hoàn tất khi các biểu đồ Plotly được kết xuất mà không nối toàn bộ HTML của trang vào biểu đồ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, jupyter-notebook, r
Lĩnh vực
data-visualization
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.