Resize callback not working
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter, jupyter-notebook, python
- Domain
- data-visualization, frontend
Research direction
Start by running the supplied Jupyter Notebook example with ipympl 0.7.0 and compare the resize_event callback with draw_event. Trace the fig.canvas.mpl_connect entry point through the notebook integration to identify why resizing does not reach the callback. Done means the example prints action when the figure is resized, with the existing callback behavior preserved.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Jupyter Notebook
- Stars
- 1.7k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from matplotlib/ipympl
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
matplotlib/ipympl#623 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
matplotlib/ipympl#622 · 13 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
matplotlib/ipympl#612 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
matplotlib/ipympl#611 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
matplotlib/ipympl#609 · 6 comments ·
All issues in matplotlib/ipympl
Similar issues
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#245 · 1 assignee ·
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gordonwatts/test-wsl2-llm#151 ·