-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #5524: Use large, but finite, values for contour extensions #5546
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
Conversation
for contour extensions
I did a bit of digging into the git logs last night and the value used to be pm 1e300. |
I have to admit I don't fully understand this code path. As long as 1e300 when normed doesn't become infinite (since that's awfully close to the limit of double precision at 1e301) than going back to the old number seems like the safest bet. |
stupid question, but do we have any indication why we stopped using the old On Mon, Nov 23, 2015 at 11:38 AM, Michael Droettboom <
|
Good question; it turns out I'm the guilty party: #1022. I don't see any direct motivation there other than the same one that prompted all the attempts here to use finfo etc.: it seemed like the most general solution. And it was, until the (reasonable) change to pcolormesh interfered with it. |
How about the average of vmin/vmax (the local one) and the very big number? That way if the user is trying to contour huge values we will still pull the extend values past them. Anything we do here should probably also be applied to https://github.com/matplotlib/matplotlib/pull/5546/files#diff-2e46ac77d349b367229eda1b93d92fc3L1220 where the limits of the extra contours are set up. I might be misunderstanding, but I think both of these if statements could just be removed due as the average of the pulled down min should be less than the min used for norming. |
@efiring: I think you may have commented on @tacaswell's last comment here in a hangout. But just for completeness, can you say what you think we should do here. I'm fine with merging this as is for now so we can move forward with testing -- it fixes a real regression, and I don't think it makes things any worse than originally. There's probably a better/cleaner solution to be found, but I'm not sure we want that to hold us up. |
Regarding the three parts of @tacaswell's comment:
|
Fix #5524: Use large, but finite, values for contour extensions
This follows @efiring's suggestion in #5524.