diff --git a/lib/matplotlib/contour.py b/lib/matplotlib/contour.py index acf3fc0c8353..d7590d165726 100644 --- a/lib/matplotlib/contour.py +++ b/lib/matplotlib/contour.py @@ -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. diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index f370a97dc77a..d02f7b59cee6 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -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,