Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 7 commits into from
Oct 18, 2017
Merged

documentation fix regarding contour and tricontour (#9088) #9472

merged 7 commits into from
Oct 18, 2017

Conversation

verginer
Copy link
Contributor

I have changed the doc string of contour and tricontour 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 high
as N+1 which would otherwise be surprising.

Related issue: #9088

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Member

@jklymak jklymak left a 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

@@ -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
Copy link
Member

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.

@verginer
Copy link
Contributor Author

Yes I agree it is too much information. Only the clarification that there are N+1 levels is necessary.

@jklymak
Copy link
Member

jklymak commented Oct 18, 2017

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!

@QuLogic
Copy link
Member

QuLogic commented Oct 18, 2017

Unfortunately, they're one character too long.

@jklymak jklymak merged commit a5c0164 into matplotlib:master Oct 18, 2017
@jklymak
Copy link
Member

jklymak commented Oct 18, 2017

Thanks a lot @verginer

@verginer verginer deleted the contour-level-docs-fix branch October 19, 2017 07:12
@QuLogic QuLogic added this to the v2.2.0 milestone Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants