matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
774 stars 392 forks source link

MPL2.1 deprecation warning for axesPatch #382

Open naught101 opened 6 years ago

naught101 commented 6 years ago
/home/naught101/miniconda3/envs/science/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  limb = ax.axesPatch
/home/naught101/miniconda3/envs/science/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  if limb is not ax.axesPatch:
piercefreeman commented 6 years ago

Seeing this same issue - anyone have advice on a solution?

EDIT: temporarily workaround is to lock matplotlib at 2.0.2 via

pip install matplotlib==2.0.2
megies commented 6 years ago

Seeing this same issue - anyone have advice on a solution?

It's already fixed in master, see #373, so this is only about when a point release will be done.

megies commented 6 years ago

N.b. this will break basemap 1.1.0 with matplotlib 2.3 so a basemap point release is needed rather sooner than later, see https://github.com/matplotlib/matplotlib/commit/1279b841d52da5d93124b53f41274aced086f09c#diff-a7f4f21aa80e975d813bc436acb68d8cL1140.

IndianaTones commented 6 years ago

still not fixed? I tried everyone's advice and then some but the warning breaks my whole system!!

WeatherGod commented 6 years ago

Install basemap from conda-forge channel.

On Tue, Apr 24, 2018 at 11:07 AM, IndianaTones notifications@github.com wrote:

still not fixed? I tried everyone's advice and then some but the warning breaks my whole system!!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-383967742, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-Ak6ziFDD9TyrX0zdtwZUHJFPgOTks5trz-ogaJpZM4QjpTd .

IndianaTones commented 6 years ago

@WeatherGod - I did - condo install -c condo-forge basemap - but problem persists

WeatherGod commented 6 years ago

Can you confirm that you are importing the correct version (v1.1.0)? You might need to do a conda update -c conda-forge basemap

On Tue, Apr 24, 2018 at 1:00 PM, IndianaTones notifications@github.com wrote:

@WeatherGod https://github.com/WeatherGod - I did - condo install -c condo-forge basemap - but problem persists

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-384006207, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-FDRpE9uEKvnRH5q0ea0OuY0-fVaks5tr1o7gaJpZM4QjpTd .

IndianaTones commented 6 years ago

/Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. limb = ax.axesPatch /Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch: :(

WeatherGod commented 6 years ago
>>> from mpl_toolkits import basemap
>>> basemap.__version__
'1.1.0'

What does it say for you?

On Tue, Apr 24, 2018 at 2:54 PM, IndianaTones notifications@github.com wrote:

/Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/ init.py:1708: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. limb = ax.axesPatch /Users/ah104/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/ init.py:1711: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch: :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-384041660, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-AW96NghnNUjOrdEsbXxRwfVofikks5tr3TKgaJpZM4QjpTd .

IndianaTones commented 6 years ago
>>> from mpl_toolkits import basemap
>>> basemap.__version__
'1.1.0'

same! what am I doing wrong?

megies commented 6 years ago

@WeatherGod the fix for this issue is in master but not in 1.1.0. To fix this issue a new release is needed (as mentioned above https://github.com/matplotlib/basemap/issues/382#issuecomment-374888654). This will break when matplotlib 2.3.0 comes out, not sure when this will be but we're already at 2.2.2.

[...] the warning breaks my whole system!!

I'm not sure what you mean with that, it's still only a warning in matplotlib 2.2.2, unless you've installed matplotlib from their master branch the only problem is the warning text cluttering your screen.

IndianaTones commented 6 years ago

@megies @WeatherGod thank you for the help - clearly I am a newbie! It's true, only warnings appear without errors but along with the warnings my entire system freezes and locks up with a re-start required.

megies commented 6 years ago

along with the warnings my entire system freezes and locks up with a re-start required

Alright, but certainly that freeze is not related to this issue.

IndianaTones commented 6 years ago

well, it is this issue that triggers the warnings which is then followed by freezing, so somehow it is related.

megies commented 6 years ago

well, it is this issue that triggers the warnings which is then followed by freezing, so somehow it is related.

It isn't, believe me. If you want to find out the problem, you should hop through your code line by line using a debugger. https://pymotw.com/3/pdb/index.html

But this is going way off-topic, here.

bplant17 commented 6 years ago

It locks up my whole system too...

Linux-cpp-lisp commented 6 years ago

Can confirm that this warning still appears with the latest release (v1.1.0, installed today, from source, following the documentation).

...lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
  if limb is not ax.axesPatch:
WeatherGod commented 6 years ago

yes, the fix was not in v1.1.0, but it is in master.

On Thu, Sep 6, 2018 at 3:50 PM Alby M. notifications@github.com wrote:

Can confirm that this warning still appears with the latest release ( v1.1.0 https://github.com/matplotlib/basemap/releases/tag/v1.1.0, installed today, from source, following the documentation https://matplotlib.org/basemap/users/installing.html).

...lib/python3.5/site-packages/mpl_toolkits/basemap/init.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. if limb is not ax.axesPatch:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/382#issuecomment-419219567, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-DzMnzfkTZx9WsleAqKIQWCO1bJ_ks5uYXyMgaJpZM4QjpTd .

megies commented 6 years ago

It locks up my whole system too...

I've said it before, a deprecation warning is not gonna freeze your system. You need to use a debugger to find out what command actually does not finish.