geoplotlib icon indicating copy to clipboard operation
geoplotlib copied to clipboard

Change import of pylab, changed import statement

Open timgrossmann opened this issue 5 years ago β€’ 1 comments

Using the ColorMap in the current version leads to an error:

Example:

# converting the obesity into a color
cmap = ColorMap('Reds', alpha=255, levels=40)

def get_color(properties):
    return cmap.to_color(properties['Obesity'], maxvalue=40,scale='lin')

ImportError: cannot import name 'get_cmap' from 'pylab' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pylab/__init__.py)

Since the import has changed from

from pylab import get_cmap

to

from matplotlib.pylab import get_cmap

Any chance we could update this and publish the new version to PyPi, @andrea-cuttone ? 😊

timgrossmann avatar Dec 02 '19 07:12 timgrossmann

πŸ‘to this. Just ran into this same issue.

johnlanda avatar Dec 07 '19 22:12 johnlanda