-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Maximum bins allowed for different color brewer palettes, in choropleth? #1270
Comments
Hi, could you share a bit more on what happened please. What was the full error? Can you share a short, self-contained code snippet that produces the same error? |
Hi, If you are using a specific colormap and request more bins than the individual colors you will end up with a non descriptive KeyError raised in
The same error can be raised by doing branca.utilities.color_brewer('RdYlBu', 30) #that colormap has only 11 colors A workaround can be branca.utilities.linear_gradient(branca.utilities.color_brewer('RdYlBu'), 30) However there is no way that I can see to have For the moment, and going forward I guess would be nice to be able to provide a list of hex colors of same length as bins when creating a Choropleth object |
Please add a code sample or a nbviewer link, copy-pastable if possible
# Your code here
Problem description
Are there maximum no. of bins for different color brewer palettes in choropleth? Because if I am overriding the default 6 bins and setting it to 12, I am getting the message "Check to make sure that it is not a qualitative scheme." with some color brewer palettes.
Expected Output
Output of
folium.__version__
The text was updated successfully, but these errors were encountered: