ipympl causes matplotlib deprecation warning
See original GitHub issueEvery plot currently issues a MPL deprecation warning:
/Users/klay6683/miniconda3/envs/stable/lib/python3.6/site-packages/matplotlib/__init__.py:932: MatplotlibDeprecationWarning: nbagg.transparent is deprecated and ignored. Use figure.facecolor instead.
mplDeprecation)
How can we fix this? Versions: MPL: 2.2.0, ipympl 0.1.0 (both via conda-forge) I only get the warning AFTER I activate the ipympl backend.
On the other note, seeing that not much is happening at this repo, is this really the official backend for doing dynamic plots in notebooks and j-lab now?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:20 (9 by maintainers)
Top Results From Across the Web
Python/matplotlib : getting rid of matplotlib.mpl warning
MatplotlibDeprecationWarning: mplDeprecation was deprecated in Matplotlib 3.6 and will be removed two minor releases later ... use this instead: import warnings ...
Read more >GitHub statistics for 3.6.0 (Sep 15, 2022) - Matplotlib
PR #23862: Remove triggering of deprecation warning in ... PR #23755: Backport PR #23742 on branch v3.6.x (FIX: unbreak ipympl).
Read more >https://matplotlib.org/stable/_sources/users/prev_...
:ghpull:`17814`: Don't duplicate deprecated parameter addendum. ... :ghpull:`17639`: DOC: Update colormap deprecation warning to use Python's copy function.
Read more >GitHub statistics for 3.3.0 (Jul 16, 2020) - Matplotlib
PR #17639: DOC: Update colormap deprecation warning to use Python's copy function. PR #17223: Warn on invalid savefig keyword arguments.
Read more >https://matplotlib.org/3.6.0/_sources/users/github...
:ghpull:`23711`: Fix deprecation messages for vendoring unused things ... :ghpull:`23637`: BLD: Add Python 3.11 builds to CI * :ghpull:`23632`: Add ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I was running into this issue as well and found it interesting that even checking to see if the key is in rcParams throws the warning. A quick fix that will at least remove the warning if you don’t even have that key in rcParams is to check against a set of the keys rather than the keys themselves:
if 'nbagg.transparent' in set(rcParams.keys()) and rcParams['nbagg.transparent']:https://github.com/matplotlib/jupyter-matplotlib/blob/0f1e870c1ee3583767759fa1134fff429767ac6a/ipympl/backend_nbagg.py#L240-L241
darn it, i changed machine and had the old version 0.0.8 version on this one. This is all caused by the missing py37 version (sorry for ranting)…