You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ooh boy... yeah... This is harmless, but annoying. And can be an issue in
the future.
When calling properties() for an artist, it will dir() the object
itself, and find any "get_*" methods that are callable. It tosses any
aliases, and builds up a dictionary of results from calling all of those
getters. Therefore, it also picks up the get_axes() method, thereby
incurring the warning.
If we are deprecating get_axes(), then that means we are changing the
output of properties(). We should probably modify this method so that we
filter out deprecated "get_*" methods, and fetch them via their respective
property instead, I think.
In [4]: ax.properties()/Users/tom.augspurger/Envs/dev/lib/python3.4/site-packages/matplotlib-1.5.0rc1+0.gab00a04.dirty-py3.4-macosx-10.10-x86_64.egg/matplotlib/artist.py:221: MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use the
axes property. A removal date has not been set.
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
The root cause is a call to ax.get_axes().
—
Reply to this email directly or view it on GitHub #5089.
In [1]: frommatplotlib.cbookimportMatplotlibDeprecationWarningIn [2]: importwarningsIn [3]: fig, ax=plt.subplots()
In [4]: warnings.simplefilter('ignore', MatplotlibDeprecationWarning)
In [5]: _=ax.properties()
cavet emptor and all that, you could be silencing important warnings.
Activity
WeatherGod commentedon Sep 16, 2015
ooh boy... yeah... This is harmless, but annoying. And can be an issue in
the future.
When calling
properties()for an artist, it willdir()the objectitself, and find any "get_*" methods that are callable. It tosses any
aliases, and builds up a dictionary of results from calling all of those
getters. Therefore, it also picks up the
get_axes()method, therebyincurring the warning.
If we are deprecating
get_axes(), then that means we are changing theoutput of
properties(). We should probably modify this method so that wefilter out deprecated "get_*" methods, and fetch them via their respective
property instead, I think.
Thoughts?
On Wed, Sep 16, 2015 at 1:55 PM, Tom Augspurger notifications@github.com
wrote:
tacaswell commentedon Sep 16, 2015
@WeatherGod Sounds right to me. I remember doing this in some functions, may
setpandgetp?josePhoenix commentedon Nov 3, 2015
Just came across this warning myself and found this issue, +1 to the proposed solution
tacaswell commentedon Nov 3, 2015
The first thing that feel through the cracks for 1.5.0
TomAugspurger commentedon Nov 3, 2015
Not the worst issue to miss!
For people looking for a workaround.
cavet emptor and all that, you could be silencing important warnings.
FIX: suppress warning in Artist.properties