question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ipympl causes matplotlib deprecation warning

See original GitHub issue

Every 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
greglucascommented, Mar 29, 2018

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

0reactions
michaelayecommented, Nov 16, 2018

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)…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found