Closing a figure from the notebook does not close the python figure
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, jupyter-notebook, python
Hướng nghiên cứu
Bắt đầu với js/src/mpl_widget.js, đặc biệt là hàm xóa khỏi DOM và phần xử lý nút đóng widget được mô tả trong issue. Tái hiện sự cố bằng cách thực thi ô biểu đồ lặp đi lặp lại và đóng widget một cách rõ ràng, sau đó xác minh rằng số lượng figure, mức sử dụng bộ nhớ và cảnh báo về hơn 20 figure không còn tăng nữa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This is essentially a regression of https://github.com/matplotlib/matplotlib/issues/4841 which happened when the nbagg backend was converted to a widget.
To reproduce create a cell with a simple plot.
plt.plot(range(10))
plt.show()
re execute the cell and observe that the figure count goes up and memory consumption goes up too. If you continue doing this you will eventually have more than 20 open figures and matplotlib will print a warning even if you only have one figure displayed.
The same is true if you explicitly close the widget using the widget close cross on the left of the figure.
I have spent some time trying to figure out how to best fix this but don't really know how to best do this. This function
is meant to trigger a close message to the python side when the figure is removed from the DOM but no longer works.
The old no longer existing close button is also intended to send a close signal to the python layer but this is not hooked up to the widget close button.
https://github.com/matplotlib/matplotlib/issues/6414 has some more related issues.
- 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
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.
Issue khác của matplotlib/ipympl
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
matplotlib/ipympl#623 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
matplotlib/ipympl#622 · 13 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
matplotlib/ipympl#612 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
matplotlib/ipympl#611 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
matplotlib/ipympl#609 · 6 bình luận ·
Tất cả issue của matplotlib/ipympl
Issue tương tự
-
area/sessions comp/cron comp/gateway P2 sweeper:risk-message-delivery sweeper:risk-session-state type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#118863 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3312 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
needs-acceptance wg/data-plane-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/semantic-router#4024 · 1 bình luận ·