FIX: image respect norm limits w/ None#11047
Merged
tacaswell merged 3 commits intomatplotlib:masterfrom May 14, 2018
Merged
Conversation
tacaswell
reviewed
Apr 13, 2018
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 |
Member
There was a problem hiding this comment.
I would do if self.norm.vmin is None or self.norm.vmax is None: self.norm.autoscale_None(A)
Member
Author
There was a problem hiding this comment.
Sure - its OK to modify the norm here?
Member
Author
There was a problem hiding this comment.
don't even need the if-statement in that case.
9d17f6f to
023ddb8
Compare
Member
Author
|
Ping @tacaswell |
timhoffm
approved these changes
May 5, 2018
Member
timhoffm
left a comment
There was a problem hiding this comment.
Please squash before merging.
023ddb8 to
918c8a5
Compare
Member
Author
|
squashed and rebased.... |
918c8a5 to
8d53a8a
Compare
|
There seem to be a conflict, please backport manually |
Member
|
Does this want a backport to |
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Aug 4, 2018
…rm-limits
FIX: image respect norm limits w/ None
Conflicts:
lib/matplotlib/image.py
- keep changes backported from master. Looks like conflict
was due to some white-space clean up done on master.
Member
|
backported to v2.2.x as faf9684 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Re-closes #10072
We are slowly suqishing the "big number" bugs in imshow.
This one was caused by only specifying
vmaxbut notvmin. Algorithm is the same as before, but ifvminisNone, then we scale bya_min.Before
After
PR Checklist