Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ipympl not working nicely with interact

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

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ệ
jupyter, jupyter-notebook, python

Hướng nghiên cứu

Chạy reproducer ipympl và interact được cung cấp, sau đó so sánh hành vi cập nhật figure của nó với inline backend. Theo dõi đường dẫn cập nhật backend ipympl và widget liên quan đến các lần gọi interact lặp lại; công việc được hoàn tất khi các bản cập nhật vẫn giữ một plot hiển thị mà không xóa figure.

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

Mô tả

Trying to follow some simple examples of Jupyter widgets with matplotlib, but I'm having issues when using the ipympl backend. The first update to a plot produces a second plot (overplotted), and the second update just erases the figure window altogether. This does not happen when using inline.

Here's some simple code to reproduce the issue:

%matplotlib ipympl
import matplotlib.pyplot as plt
from ipywidgets import interact

def f(n):
    plt.plot([0,1,2],[0,1,n])
    plt.show()
interact(f,n=(0,10));

If I use inline, this will update the line plot. With ipympl it fails.

I am using ipympl 0.1.0 from Anaconda, together will other packages:

ipywidgets                7.0.0              py36_intel_0  [intel]  intel
ipympl                    0.1.0                    py36_1    conda-forge
matplotlib                2.0.2           np113py36_intel_1  [intel]  intel
ipython                   6.1.0              py36_intel_0  [intel]  intel
jupyter                   1.0.0              py36_intel_5  [intel]  intel
jupyter_client            5.1.0              py36_intel_0  [intel]  intel
jupyter_console           5.1.0              py36_intel_0  [intel]  intel
jupyter_core              4.3.0              py36_intel_1  [intel]  intel
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

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.

Issue khác của matplotlib/ipympl

Tất cả issue của matplotlib/ipympl

Issue tương tự

Thêm issue về Data Visualization

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.