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

Revert to BoundaryNorm if TwoSlopeNorm not found #270

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

rjleveque
Copy link
Member

In add_colormaps, the improved version doesn't work with older versions of
matplotlib.

In add_colormaps, the improved version doesn't work with older versions of
matplotlib.
norm = colors.TwoSlopeNorm(data_break, data_limits[0], data_limits[1])
except:
# older matplotlib.colors did not have TwoSlopeNorm, revert to old:
norm = colors.BoundaryNorm(boundaries=bounds, ncolors=N)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to catch only the specific error, whatever that was.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@rjleveque rjleveque merged commit 973f7dd into clawpack:master Jun 8, 2020
@rjleveque rjleveque deleted the no_TwoStepNorm branch June 9, 2020 20:30
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