8000 numpydoc IndexFormatter · matplotlib/matplotlib@784e498 · GitHub
[go: up one dir, main page]

Skip to content

Commit 784e498

Browse files
committed
numpydoc IndexFormatter
1 parent 0073fe3 commit 784e498

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