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

Notebook rendered with Voila does not show Axes in a matplotlib widget

Đang mở
#412 2 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
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
jupyter-notebook, python

Hướng nghiên cứu

Bắt đầu bằng cách chạy ví dụ tối thiểu có thể tái hiện với các phiên bản ipympl, JupyterLab, ipywidgets và Voila được liệt kê, sau đó so sánh đầu ra của widget trong JupyterLab và Voila. Hoàn thành khi widget matplotlib được Voila kết xuất hiển thị Axes và dữ liệu được vẽ giống như trong JupyterLab.

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

Mô tả

Describe the issue

When rendering a notebook using Voila, the interactive matplotlib widget using ipympl backend is also rendered. However this widget is completely missing the Axes, therefore not showing any data at all.

A minimum reproducible code would be

%matplotlib widget

plt.ioff()
figRHF = plt.figure(figsize=(10, 5))
figRHF.canvas.layout.min_height = '400px'
axRHF = figRHF.gca()
test = axRHF.plot([0, 1], [0, 1])
print(axRHF)
print(figRHF)
print(figRHF.gca())
print(test)

display(
    figRHF.canvas
)

And this is the output from this code, on the left is the Jupyter Lab notebook output, on the right is the Voila output
image

Versions

'3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:22:46) [MSC v.1916 64 bit (AMD64)]'
ipympl version: 0.8.2

Selected Jupyter core packages...
IPython          : 7.29.0
ipykernel        : 6.5.0
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.9.1
jupyter_server   : 1.11.2
jupyterlab       : 3.2.4
nbclient         : 0.5.9
nbconvert        : 6.3.0
nbformat         : 5.1.3
notebook         : 6.4.6
qtconsole        : not installed
traitlets        : 5.1.1

Known nbextensions:
  config dir: C:\Users\are014\Miniconda3\envs\humaninjurymodel\etc\jupyter\nbconfig
    notebook section
      ipydatetime/extension enabled 
      jupyter-matplotlib/extension enabled 
      voila/extension enabled 
      jupyter-js-widgets/extension enabled 

      - Validating: ok
      - Validating: ok
      - Validating: ok
      - Validating: ok
 
JupyterLab v3.2.4
C:\Users\are014\Miniconda3\envs\humaninjurymodel\share\jupyter\labextensions
        jupyter-matplotlib v0.10.2 enabled ok
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled ok (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.1.0 enabled ok (python, voila)

Other labextensions (built into JupyterLab)
   app dir: C:\Users\are014\Miniconda3\envs\humaninjurymodel\share\jupyter\lab
        jupyter-widget-datetime v1.2.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.