matplotlib / matplotlib/ipympl
Running a cell producing a plot for a second time, and the plot fails to display
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 1.7k
- Fork
- 234
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Describe the issue
When using ipympl with the %matplotlib widget magic, I can successfully display a plot. Rerunning the cell with the plot however, fails to re-display the figure.

the following is visible in the error console

Note: that adding plt.show() to the cell and re-running does display a plot however the color of the line in the plot is different, suggesting that this is a new (second) matplotlib figure and not the original.
Versions
3.8.10 | packaged by conda-forge | (default, May 10 2021, 22:58:09)
[Clang 11.1.0 ]
ipympl version: 0.9.3
Selected Jupyter core packages...
IPython : 8.10.0
ipykernel : 6.21.2
ipywidgets : 8.0.4
jupyter_client : 8.0.3
jupyter_core : 5.2.0
jupyter_server : 2.3.0
jupyterlab : 3.5.3
nbclient : 0.7.2
nbconvert : 7.2.9
nbformat : 5.7.3
notebook : 6.5.2
qtconsole : not installed
traitlets : 5.9.0
Known nbextensions:
config dir: /Users/stevejpurves/.jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK
config dir: /Users/stevejpurves/miniconda3/envs/em_recharge/etc/jupyter/nbconfig
notebook section
bqplot/extension enabled
- Validating: OK
ipyevents/extension enabled
- Validating: OK
ipysheet/extension enabled
- Validating: OK
ipytree/extension enabled
- Validating: OK
jupyter-leaflet/extension enabled
- Validating: OK
jupyter-matplotlib/extension enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
JupyterLab v3.5.3
/Users/stevejpurves/miniconda3/envs/em_recharge/share/jupyter/labextensions
ipytree v0.2.2 enabled OK
jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
bqplot v0.5.37 enabled OK (python, bqplot)
jupyter-matplotlib v0.11.3 enabled OK
jupyter-leaflet v0.17.2 enabled OK
ipysheet v0.7.0 enabled OK (python, ipysheet)
ipyevents v2.0.1 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.5 enabled OK (python, jupyterlab_widgets)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện việc chạy lại ô %matplotlib widget đã được báo cáo trong JupyterLab với ipympl, sau đó so sánh console lỗi của trình duyệt và hình được hiển thị ở lần chạy thứ nhất và thứ hai. Không có tệp mã nguồn hoặc bài kiểm thử nào được nêu; công việc được xem là hoàn tất khi chạy lại ô hiển thị đáng tin cậy hình ban đầu mà không yêu cầu plt.show() hoặc tạo một hình thứ hai có màu khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- jupyter-notebook, python
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100