From 0800a480d15a0b5971dbc4dd3c150b3d5e9e073c Mon Sep 17 00:00:00 2001 From: hannah Date: Mon, 6 Nov 2023 15:37:11 -0500 Subject: [PATCH] Backport PR #27276: Clarify behavior of `prune` parameter to MaxNLocator. --- lib/matplotlib/ticker.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index 958e25d7b2c7..5b1b7e11408c 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -1996,13 +1996,11 @@ def __init__(self, nbins=None, **kwargs): If True, autoscaling will result in a range symmetric about zero. prune : {'lower', 'upper', 'both', None}, default: None - Remove edge ticks -- useful for stacked or ganged plots where - the upper tick of one axes overlaps with the lower tick of the - axes above it, primarily when :rc:`axes.autolimit_mode` is - ``'round_numbers'``. If ``prune=='lower'``, the smallest tick will - be removed. If ``prune == 'upper'``, the largest tick will be - removed. If ``prune == 'both'``, the largest and smallest ticks - will be removed. If *prune* is *None*, no ticks will be removed. + Remove the 'lower' tick, the 'upper' tick, or ticks on 'both' sides + *if they fall exactly on an axis' edge* (this typically occurs when + :rc:`axes.autolimit_mode` is 'round_numbers'). Removing such ticks + is mostly useful for stacked or ganged plots, where the upper tick + of an axes overlaps with the lower tick of the axes above it. min_n_ticks : int, default: 2 Relax *nbins* and *integer* constraints if necessary to obtain