Skip to content

Commit 710ffd9

Browse files
authored
Merge pull request #19136 from meeseeksmachine/auto-backport-of-pr-19002-on-v3.3.3-doc
Backport PR #19002 on branch v3.3.3-doc (DOC: Add note about locators at top of ticker docs)
2 parents 447bdbb + dd88dfe commit 710ffd9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/matplotlib/ticker.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@
8181
8282
The default minor locator is `NullLocator`, i.e., no minor ticks on by default.
8383
84+
.. note::
85+
`Locator` instances should not be used with more than one
86+
`~matplotlib.axis.Axis` or `~matplotlib.axes.Axes`. So instead of::
87+
88+
locator = MultipleLocator(5)
89+
ax.xaxis.set_major_locator(locator)
90+
ax2.xaxis.set_major_locator(locator)
91+
92+
do the following instead::
93+
94+
ax.xaxis.set_major_locator(MultipleLocator(5))
95+
ax2.xaxis.set_major_locator(MultipleLocator(5))
96+
8497
Tick formatting
8598
---------------
8699

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