Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: let colorbar extends work for PowerNorm#11610
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Minor style issue.
lib/matplotlib/colorbar.py Outdated
if isinstance(self.norm, colors.LogNorm): | ||
# If using a lognorm, ensure extensions don't go negative | ||
if (isinstance(self.norm, colors.LogNorm) or | ||
isinstance(self.norm, colors.PowerNorm)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
if isinstance(self.norm, (colors.lOGNorm, colors.PowerNorm)):
15209b6
toe43763a
Compare@@ -802,8 +802,9 @@ def _process_values(self, b=None): | |||
b = self.norm.inverse(self._uniform_y(self.cmap.N + 1)) | |||
if isinstance(self.norm, colors.LogNorm): | |||
# If using a lognorm, ensure extensions don't go negative | |||
if isinstance(self.norm, (colors.PowerNorm, colors.LogNorm)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I feel like this kind of stuff should be handled by the specificNorm
class, instead of being "special cased" here in this code, but since this is howLogNorm
is dealt with at the moment I guess this is fine as a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hmmm, interesting idea. This "b" is just the points that are used to make the pcolor mesh that makes the colorbar. So its a bit of a toss up where making that list should get created and how.
Looks like this is failing on the pytz tests,@pganssle any ideas what's going on with the travis build? |
I think its coming from flake-8. I guess we should rerun flake8 on any new merges.
|
e43763a
to092e4da
Comparepganssle commentedJul 10, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Maybe |
|
I dunno if this is the issue to talk about it on, but it occurs to me that the |
Looks like it is a bug in an old pytest / xdist.... |
The new merges let Travis pass, at least for this PR.... |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Closes#11486
PowerNorm
needed similar special casing toLogNorm
forextend='min'
for colorbar...Before:
After:
PR Checklist