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

Error in chloropleth function #65

Open
jnclelland opened this issue Jul 25, 2024 · 0 comments
Open

Error in chloropleth function #65

jnclelland opened this issue Jul 25, 2024 · 0 comments

Comments

@jnclelland
Copy link

When trying to use the chloropleth function as in the docs, I get the following error:

"AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'"

A google search reveals that as of Matplotlib 3.9, the command

"colorbarmap = plt.cm.get_cmap(cmap, len(boundaries))"

on line 89 of chloropleth.py is no longer valid syntax and should be replaced by

"colorbarmap = plt.get_cmap(cmap, len(boundaries))"

Making this change fixed the problem for me.

(See this page for more: https://stackoverflow.com/questions/52251582/matplotlib-has-no-attribute-cm-when-deploying-an-app.)

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

No branches or pull requests

1 participant