geoplotlib
geoplotlib copied to clipboard
Change import of pylab, changed import statement
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 ? π
πto this. Just ran into this same issue.