No heatmap shown with `seaborn` and `%matplotlib widget`
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, matplotlib, pandas, python
- Lĩnh vực
- data-visualization, frontend, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện heatmap seaborn và biểu đồ matplotlib đơn giản được cung cấp trong JupyterLab với %matplotlib widget, sau đó so sánh chúng với %matplotlib inline. Kiểm tra tích hợp ipympl và widget Jupyter được thiết lập này sử dụng, đồng thời xác minh các phiên bản package được liệt kê. Hoàn thành khi heatmap seaborn được render tương tác bằng widget backend.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the issue
Thank you very much for providing this tool!
I have an apparently seaborn-related problem with showing widgets; I am posting this here first. Please let me know if you think this problem is rather on seaborn's end and I'll repost it there.
The problem: seaborn figures are not shown in JupyterLab with %matplotlib widget (they do show up with %matplotlib inline):
%matplotlib widget
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
df = pd.DataFrame([[10, 20, 30, 40], [50, 30, 8, 15],
[25, 14, 41, 8], [7, 14, 21, 28]])
sns.heatmap(df, cmap='RdYlGn', linewidths=0.30, annot=True)

%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
df = pd.DataFrame([[10, 20, 30, 40], [50, 30, 8, 15],
[25, 14, 41, 8], [7, 14, 21, 28]])
sns.heatmap(df, cmap='RdYlGn', linewidths=0.30, annot=True)

No problem with matplotlib:
%matplotlib widget
import matplotlib.pyplot as plt
plt.plot([[1, 2], [0, 0]])

Versions
ipympl version: 0.8.2
Selected Jupyter core packages...
IPython : 7.29.0
ipykernel : 6.4.2
ipywidgets : 7.6.5
jupyter_client : 7.0.6
jupyter_core : 4.9.1
jupyter_server : 1.11.2
jupyterlab : 3.2.2
nbclient : 0.5.5
nbconvert : 6.2.0
nbformat : 5.1.3
notebook : 6.4.5
qtconsole : not installed
traitlets : 5.1.1
Known nbextensions:
config dir: /home/dominique/.jupyter/nbconfig
notebook section
nbextensions_configurator/config_menu/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/config_menu/main
contrib_nbextensions_help_item/main enabled
- Validating: OK
spellchecker/main enabled
- Validating: OK
gist_it/main enabled
- Validating: OK
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/tree_tab/main
config dir: /home/dominique/.local/miniconda/envs/test/etc/jupyter/nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
JupyterLab v3.2.2
/home/dominique/.local/miniconda/envs/test/share/jupyter/labextensions
jupyter-matplotlib v0.10.2 enabled OK
@jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
Installed from conda-forge
mamba create -n test matplotlib pandas seaborn jupyterlab ipympl -y -c conda-forge
More versions:
# Name Version Build Channel
matplotlib 3.4.3 py39hf3d152e_1 conda-forge
matplotlib-base 3.4.3 py39h2fa2bec_1 conda-forge
matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge
pandas 1.3.4 py39hde0f152_1 conda-forge
seaborn 0.11.2 hd8ed1ab_0 conda-forge
seaborn-base 0.11.2 pyhd8ed1ab_0 conda-forge
Do you have an idea why this is happening?
- 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 · 7 bình luận ·
Tất cả issue của matplotlib/ipympl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
duplicate invalid
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/claude-code#96312 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
palladius/ricc.rocks#7 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
pydata/pydata-sphinx-theme#2503 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
unitaryfoundation/metriq-gym#828 ·