8000 Merge pull request #13829 from dstansby/indexformatter-doc · matplotlib/matplotlib@9144412 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9144412

Browse files
authored
Merge pull request #13829 from dstansby/indexformatter-doc
numpydoc IndexFormatter
2 parents 0073fe3 + 784e498 commit 9144412

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