Uptade fix number of levels with log contour#29137
Closed
ebarcelosf wants to merge 1 commit intomatplotlib:mainfrom
Closed
Uptade fix number of levels with log contour#29137ebarcelosf wants to merge 1 commit intomatplotlib:mainfrom
ebarcelosf wants to merge 1 commit intomatplotlib:mainfrom
Conversation
ksunden
reviewed
Nov 13, 2024
| super().changed() | ||
|
|
||
| def _autolev(self, N): | ||
| def _autolev(self, N, *, using_default): |
Member
There was a problem hiding this comment.
I think this extra argument is not necessary.
The only place where this is passed it is simply a N is not None (on the input side, but the effect is the same)
So even if the variable is useful, it can be computed internally.
However, even further, the difference between LogLocator() and LogLocator(numticks=N) when N is None is nothing, therefore you can just pass it as a kwarg.
Haven't fully thought through the last portion (adjustments if levels are still insufficient) and if there may need to be at least a if N is not None in there potentially, but not sure yet.
Member
|
Thanks for the pull request - this has been fixed by #27576 now, so I'll close this. |
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
By passing an integer value in the levels argument to specify the maximum number of contour levels, the program didn't always respect this limit in practice.
Adjusts the behavior so that the number of contour levels is generated as requested, even when using a logarithmic scale.
Fix #27576
PR checklist