0

When I run the code below I get the warning: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead. limb = ax.axesPatch

I know that the code works but I still want to clean the warnings. thank's for any help

tried updating basemap from 1.0.7 to 1.2.0 using matplotlib 2.2.3 ,pycharm (2019 1.3) won't let me upgrade or downgrade matplotlib's version

changing the code of ...\mpl_toolkits\basemap__init__.py is too risky and complicated for newbie me.

import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

m = Basemap(projection= 'mill')

m.drawcoastlines()
m.drawmapboundary(fill_color='aqua')
m.fillcontinents()

plt.savefig('my first map')
plt.show()
OCG
  • 9
  • 4
  • 1
    Well, if you're not willing to change the code yourself, you either need to suppress the warning, or open a ticket on the basemap GitHub for someone to update the code. – Adriaan Jul 16 '19 at 09:00
  • If you are planning to use this code in the future it is recommended you change your code before the axesPatch function is removed. That said you could hide the warning if you like, see: https://stackoverflow.com/questions/879173/how-to-ignore-deprecation-warnings-in-python and / or https://stackoverflow.com/questions/14463277/how-to-disable-python-warnings. – Mr. Radical Jul 16 '19 at 15:20
  • I found this on github: https://github.com/matplotlib/basemap/issues/382. – Mr. Radical Jul 16 '19 at 15:32
  • Thank you guys, I'll try that once I manage to install basemap again.. this is quite a challenge – OCG Jul 16 '19 at 18:52

0 Answers0