Issue
After upgrading matplotlib
and jupyter
, jupyter lab
, the inline magic produces deprecation warnings. While this is somewhat helpful, these warnings get in the way.
Of course one can turn off the warnings:
import warnings warnings.filterwarnings('ignore')
But it doesn't seem to be the best way.
Question: how to resolve these warnings without turning all warnings off?
The magic:
%pylab inline
Warnings:
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The text.latex.preview rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The mathtext.fallback_to_cm rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle: Support for setting the 'mathtext.fallback_to_cm' rcParam is deprecated since 3.3 and will be removed two minor releases later; use 'mathtext.fallback : 'cm' instead.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The validate_bool_maybe_none function was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The savefig.jpeg_quality rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The animation.avconv_path rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
In C:\Python37\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle:
The animation.avconv_args rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
Solution
Pylab is deprecated, as far I'm aware. See the link below (best I could find, a thread on Ipython repo). I think there were many issues with it clobbering namespaces. The typical recommendation I've seen is simply to replace it with the %matplotlib inline
.
https://github.com/ipython/ipython/issues/5071/#issuecomment-34547616
Answered By - Nate
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.