-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
documentation fix regarding contour and tricontour (#9088) #9472
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
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.
Suggested edit. Welcome commentary
lib/matplotlib/contour.py
Outdated
@@ -1672,7 +1672,9 @@ def _initialize_x_y(self, z): | |||
contour(Z,N) | |||
contour(X,Y,Z,N) | |||
|
|||
contour up to *N* automatically-chosen levels. | |||
contour up to *N+1* automatically-chosen levels. | |||
If exactly *N* levels are required either *V* or an |
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.
*V*
is described right below. I'd favour either just the first sentence or maybe even:
contour up to *N+1* automatically chosed contour levels (*N* intervals).
Just to make it not seem like we are bonkers to have this convention.
Yes I agree it is too much information. Only the clarification that there are N+1 levels is necessary. |
I'll merge later so long as the tests pass (though they almost certainly will, unless some of those lines got too long for PEP8). Thanks! |
Unfortunately, they're one character too long. |
Thanks a lot @verginer |
I have changed the doc string of
contour
andtricontour
to address the issue raised in (#9088).Regarding the ambiguous number of levels.
PR Summary
The change clarifies what
N
does in the contour functions and states that it can be as highas
N+1
which would otherwise be surprising.Related issue: #9088
PR Checklist