Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib interactive (ipympl) cannot be shown #7544

Open
YongcaiHuang opened this issue Dec 8, 2024 · 0 comments
Open

matplotlib interactive (ipympl) cannot be shown #7544

YongcaiHuang opened this issue Dec 8, 2024 · 0 comments

Comments

@YongcaiHuang
Copy link

ALL software version info

Software Version Info
Package                   Version
------------------------- --------------
absl-py                   2.1.0
altair                    5.5.0
anyio                     4.7.0
appnope                   0.1.4
argon2-cffi               23.1.0
argon2-cffi-bindings      21.2.0
arrow                     1.3.0
asttokens                 3.0.0
async-lru                 2.0.4
attrs                     24.2.0
babel                     2.16.0
beautifulsoup4            4.12.3
bleach                    6.2.0
bokeh                     3.6.2
cattrs                    24.1.2
certifi                   2024.8.30
cffi                      1.17.1
charset-normalizer        3.4.0
comm                      0.2.2
contourpy                 1.3.1
cycler                    0.12.1
debugpy                   1.8.9
decorator                 5.1.1
defusedxml                0.7.1
docstring-to-markdown     0.15
executing                 2.1.0
fastjsonschema            2.21.1
flatbuffers               24.3.25
fonttools                 4.55.2
fqdn                      1.5.1
h11                       0.14.0
httpcore                  1.0.7
httpx                     0.28.1
idna                      3.10
imageio                   2.36.1
ipykernel                 6.29.5
ipympl                    0.9.4
ipython                   8.30.0
ipython-genutils          0.2.0
ipywidgets                8.1.5
isoduration               20.11.0
jax                       0.4.36
jaxlib                    0.4.36
jedi                      0.19.2
jedi-language-server      0.42.0
Jinja2                    3.1.4
joblib                    1.4.2
json5                     0.10.0
jsonpointer               3.0.0
jsonschema                4.23.0
jsonschema-specifications 2024.10.1
jupyter_client            8.6.3
jupyter_core              5.7.2
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.2
jupyter_server_terminals  0.5.3
jupyterlab                4.3.2
jupyterlab-lsp            5.1.0
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
jupyterlab_widgets        3.0.13
kiwisolver                1.4.7
lazy_loader               0.4
linkify-it-py             2.0.3
lsprotocol                2023.0.1
Markdown                  3.7
markdown-it-py            3.0.0
MarkupSafe                3.0.2
matplotlib                3.9.3
matplotlib-inline         0.1.7
mdit-py-plugins           0.4.2
mdurl                     0.1.2
mediapipe                 0.10.18
mistune                   3.0.2
ml_dtypes                 0.5.0
narwhals                  1.16.0
nbclient                  0.10.1
nbconvert                 7.16.4
nbformat                  5.10.4
nest-asyncio              1.6.0
networkx                  3.4.2
notebook_shim             0.2.4
numpy                     1.26.4
opencv-contrib-python     4.10.0.84
opt_einsum                3.4.0
overrides                 7.7.0
packaging                 24.2
pandas                    2.2.3
pandas-flavor             0.6.0
pandocfilters             1.5.1
panel                     1.5.4
param                     2.1.1
parso                     0.8.4
patsy                     1.0.1
pexpect                   4.9.0
pillow                    11.0.0
pingouin                  0.5.5
pip                       24.3.1
platformdirs              4.3.6
prometheus_client         0.21.1
prompt_toolkit            3.0.48
protobuf                  4.25.5
psutil                    6.1.0
ptyprocess                0.7.0
pure_eval                 0.2.3
pycparser                 2.22
pygls                     1.3.1
Pygments                  2.18.0
pyparsing                 3.2.0
python-dateutil           2.9.0.post0
python-json-logger        2.0.7
pytz                      2024.2
pyviz_comms               3.0.3
PyYAML                    6.0.2
pyzmq                     26.2.0
referencing               0.35.1
requests                  2.32.3
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.22.3
scikit-image              0.24.0
scikit-learn              1.5.2
scikit-posthocs           0.11.1
scipy                     1.14.1
seaborn                   0.13.2
Send2Trash                1.8.3
sentencepiece             0.2.0
setuptools                75.6.0
six                       1.17.0
sniffio                   1.3.1
sounddevice               0.5.1
soupsieve                 2.6
stack-data                0.6.3
statsmodels               0.14.4
tabulate                  0.9.0
terminado                 0.18.1
threadpoolctl             3.5.0
tifffile                  2024.9.20
tinycss2                  1.4.0
tornado                   6.4.2
tqdm                      4.67.1
traitlets                 5.14.3
types-python-dateutil     2.9.0.20241206
typing_extensions         4.12.2
tzdata                    2024.2
uc-micro-py               1.0.3
uri-template              1.3.0
urllib3                   2.2.3
wcwidth                   0.2.13
webcolors                 24.11.1
webencodings              0.5.1
websocket-client          1.8.0
widgetsnbextension        4.0.13
xarray                    2024.11.0
xyzservices               2024.9.0

Description of expected behavior and the observed behavior

matplotlib interactive (ipympl) cannot be shown with error: 500: Internal Server Error. Also, on documentation page, interactive plot cannot be shown as well

Complete, minimal, self-contained example code that reproduces the issue

import matplotlib.pyplot as plt
import numpy as np
import panel as pn

fig = plt.Figure(figsize=(8, 6))
ax = fig.add_subplot(111)

dx, dy = 0.05, 0.05

# generate 2 2d grids for the x & y bounds
y, x = np.mgrid[slice(1, 5 + dy, dy),
slice(1, 5 + dx, dx)]

z = np.sin(x)**10 + np.cos(10 + y*x) * np.cos(x)

cf = ax.contourf(x + dx/2., y + dy/2., z)
fig.colorbar(cf, ax=ax)

pn_fig = pn.pane.Matplotlib(fig, interactive=False)
pn.serve(pn_fig)

Screenshots or screencasts of the bug in action

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant