Skip to content

Commit 76c764c

Browse files
authored
Merge pull request #16534 from pharshalp/maxnlocator_contourf_contour_doc
DOC: MaxNLocator and contour/contourf doc update (replaces #16428)
2 parents 12f2624 + abad4b6 commit 76c764c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/matplotlib/contour.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,8 +1612,10 @@ def _initialize_x_y(self, z):
16121612
levels : int or array-like, optional
16131613
Determines the number and positions of the contour lines / regions.
16141614
1615-
If an int *n*, use *n* data intervals; i.e. draw *n+1* contour
1616-
lines. The level heights are automatically chosen.
1615+
If an int *n*, use an algorithm
1616+
(see `~matplotlib.ticker.MaxNLocator`) that tries to provide
1617+
no more than *n+1* "nice" contour levels between vmin and vmax.
1618+
The level heights are automatically chosen.
16171619
16181620
If array-like, draw contour lines at the specified levels.
16191621
The values must be in increasing order.

lib/matplotlib/ticker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,8 @@ def ge(self, x):
19451945

19461946
class MaxNLocator(Locator):
19471947
"""
1948-
Select no more than N intervals at nice locations.
1948+
Find nice tick locations with no more than N being within the view limits.
1949+
Locations beyond the limits are added to support autoscaling.
19491950
"""
19501951
default_params = dict(nbins=10,
19511952
steps=None,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy