ipympl for matplotlib not created through pyplot
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization, documentation
Research direction
No project files or tests are named. Start by reproducing the Jupyter notebook snippet with the SageMath-produced matplotlib figure and inspect whether ipympl can provide a canvas for it; done means establishing whether this workflow works and documenting a minimal example or the limitation.
Written by the indexing model from the issue text.
Description
Is it possible to use ipympl starting from an arbitrary matplotlib figure? If yes, an example would be helpful. Thanks!
Use Case: I would like to use ipympl for SageMath plots. The later do have a method to
convert them to matplotlib figure. However the figure has not been created with the usual
pyplot workflow, and does not have a canvas setup.
In a jupyter notebook with the SageMath kernel (e.g. using the binder link from https://github.com/sagemath/sage-binder-env/ after installing ipympl with sage -pip install ipyml)
%matplotlib widget
p = plot(sin(x))
fig = p.matplotlib();
type(fig.canvas)
<class 'NoneType'>
It could well be that SageMath is producing weird matplotlib figures though.
cc: @zerline
- 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 · 7 comments ·
All issues in matplotlib/ipympl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
duplicate invalid
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
iVis-at-Bilkent/newt#984 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/ricc.rocks#7 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pydata/pydata-sphinx-theme#2503 ·