Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change import of pylab, changed import statement #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

timgrossmann
Copy link
Contributor

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 ? 😊

@johnlanda
Copy link

👍to this. Just ran into this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants