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: image respect norm limits w/ None#11047
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
FIX: image respect norm limits w/ None#11047
Uh oh!
There was an error while loading.Please reload this page.
Conversation
lib/matplotlib/image.py Outdated
a_max = np.float64(newmax) | ||
if newmax is not None or newmin is not None: | ||
A_scaled = np.clip(A_scaled, newmin, newmax) | ||
vmin = self.norm.vmin if self.norm.vmin is not None else a_min |
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 would doif self.norm.vmin is None or self.norm.vmax is None: self.norm.autoscale_None(A)
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.
Sure - its OK to modify the norm here?
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.
don't even need the if-statement in that case.
9d17f6f
to023ddb8
ComparePing@tacaswell |
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.
Please squash before merging.
023ddb8
to918c8a5
Comparesquashed and rebased.... |
918c8a5
to8d53a8a
CompareThere seem to be a conflict, please backport manually |
Does this want a backport to |
…rm-limitsFIX: image respect norm limits w/ NoneConflicts:lib/matplotlib/image.py - keep changes backported from master. Looks like conflict was due to some white-space clean up done on master.
backported to v2.2.x asfaf9684 |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Re-closes#10072
We are slowly suqishing the "big number" bugs in imshow.
This one was caused by only specifying
vmax
but notvmin
. Algorithm is the same as before, but ifvmin
isNone
, then we scale bya_min
.Before
After
PR Checklist