8000 Merge pull request #13830 from meeseeksmachine/auto-backport-of-pr-13… · matplotlib/matplotlib@22faca3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22faca3

Browse files
authored
Merge pull request #13830 from meeseeksmachine/auto-backport-of-pr-13829-on-v3.1.x
Backport PR #13829 on branch v3.1.x (numpydoc IndexFormatter)
2 parents c5f1910 + ff178f3 commit 22faca3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/ticker.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,13 @@ def _set_locator(self, locator):
302302

303303
class IndexFormatter(Formatter):
304304
"""
305-
Format the position x to the nearest i-th label where i=int(x+0.5)
305+
Format the position x to the nearest i-th label where ``i = int(x + 0.5)``.
306+
Positions where ``i < 0`` or ``i > len(list)`` have no tick labels.
307+
308+
Parameters
309+
----------
310+
labels : list
311+
List of labels.
306312
"""
307313
def __init__(self, labels):
308314
self.labels = labels

0 commit comments

Comments
 (0)
0