Skip to content

Commit

Permalink
Backport PR matplotlib#27276: Clarify behavior of prune parameter t…
Browse files Browse the repository at this point in the history
…o MaxNLocator.
  • Loading branch information
story645 authored and meeseeksmachine committed Nov 6, 2023
1 parent 476c4bc commit 0800a48
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0800a48

Please sign in to comment.