Skip to content

DOC: MaxNLocator and contour/contourf doc update #16428

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,8 +1612,9 @@ def _initialize_x_y(self, z):
levels : int or array-like, optional
Determines the number and positions of the contour lines / regions.

If an int *n*, use *n* data intervals; i.e. draw *n+1* contour
lines. The level heights are automatically chosen.
If an int *n*, use at most *n+2* data intervals;
i.e. draw at most *n+1* contour lines.
The level heights are automatically chosen.

If array-like, draw contour lines at the specified levels.
The values must be in increasing order.
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ def ge(self, x):

class MaxNLocator(Locator):
"""
Select no more than N intervals at nice locations.
Select no more than N+1 intervals (i.e. N+2 ticks) at nice locations.
"""
default_params = dict(nbins=10,
steps=None,
Expand Down