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

fixes crash when using contourf with extend option and changing contourf levels to represent a range. #16

Merged
merged 2 commits into from
Jun 26, 2020

Conversation

nzahasan
Copy link
Contributor

@nzahasan nzahasan commented Apr 6, 2020

Using contourf_to_geojson_overlap with extend="both" in matplotlib contourf causes crash because this creates n+1 contour levels thus for last polygon no level existes in countourf.levels list. Also in case of coutourf plot the colors represent range. According to matplotlib documentation if defined levels are [1,5] then this will produce one filled contour with 1<fill_color <=5 level. If used with extend="max" the contour levels will be <=1, >1 to <=5, >5. This pull request tries to fix this issue.

@nzahasan nzahasan changed the title fixed - using contourf extend causes crash & countourf levels fixes crash when using contourf with extend option and changing contourf levels to represent a range. Apr 8, 2020
@bartromgens bartromgens merged commit bd32694 into bartromgens:master Jun 26, 2020
@bartromgens
Copy link
Owner

@nzahasan Thanks for the fix. I just created a new release (v0.4.0) that contains it.

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