8000 Backport PR #13829: numpydoc IndexFormatter · matplotlib/matplotlib@ff178f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff178f3

Browse files
anntzerMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #13829: numpydoc IndexFormatter
1 parent c5f1910 commit ff178f3

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 + 961B 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