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

Resize callback not working

Đang mở
#326 3 bình luận 0 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

Bắt đầu bằng cách chạy ví dụ Jupyter Notebook được cung cấp với ipympl 0.7.0 và so sánh callback resize_event với draw_event. Theo dõi điểm vào fig.canvas.mpl_connect qua phần tích hợp notebook để xác định tại sao việc thay đổi kích thước không đến được callback. Hoàn tất khi ví dụ in action lúc figure được thay đổi kích thước, đồng thời giữ nguyên hành vi callback hiện tại.

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

Mô tả

bug

Describe the issue

I am having an issue specifically with the Resize callback. The other callback options appear to work as expected. For example replacing 'resize_event' with 'draw_event' in the code block below gives no issues.

import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import Output
%matplotlib widget

output = Output()

@output.capture()
def key_event(event):
    print('action')

fig, ax = plt.subplots()
ax.plot(np.random.rand(10))
fig.canvas.mpl_connect('resize_event', key_event)

display(output)

Versions

3.6.8 (default, Jan 14 2019, 11:02:34) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
ipympl version: 0.7.0
jupyter core     : 4.5.0
jupyter-notebook : 6.0.1
qtconsole        : not installed
ipython          : 7.7.0
ipykernel        : 5.1.2
jupyter client   : 5.3.1
jupyter lab      : 1.0.9
nbconvert        : 5.6.0
ipywidgets       : 7.6.3
nbformat         : 4.4.0
traitlets        : 4.3.2
Known nbextensions:
  config dir: /usr/local/etc/jupyter/nbconfig
    notebook section
      ipyvolume/extension  enabled
      - Validating: OK
      jupyter-datawidgets/extension  enabled
      - Validating: OK
      jupyter-matplotlib/extension  enabled
      - Validating: OK
      jupyter-threejs/extension  enabled
      - Validating: OK
      jupyter-webrtc/extension  enabled
      - Validating: OK
      jupyter-js-widgets/extension  enabled
      - Validating: OK
    tree section
      ipyparallel/main  enabled
      - Validating: OK
JupyterLab v1.0.9
Known labextensions:
   app dir: /usr/local/share/jupyter/lab
        jupyter-threejs v2.3.0  enabled  OK
        jupyterlab-datawidgets v7.0.0  enabled  OK
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.