Skip to content

Commit 2589472

Browse files
committed
Cleanup xticks/yticks docstrings.
- Don't bother listing call signatures (the normal function signature is fine). - Slightly tighten the parameters/return value descriptions.
1 parent 907efd0 commit 2589472

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

lib/matplotlib/pyplot.py

+10-26
Original file line numberDiff line numberDiff line change
@@ -1372,29 +1372,21 @@ def xticks(ticks=None, labels=None, **kwargs):
13721372
"""
13731373
Get or set the current tick locations and labels of the x-axis.
13741374
1375-
Call signatures::
1376-
1377-
locs, labels = xticks() # Get locations and labels
1378-
xticks(ticks, [labels], **kwargs) # Set locations and labels
1379-
13801375
Parameters
13811376
----------
1382-
ticks : array-like
1383-
A list of positions at which ticks should be placed. You can pass an
1384-
empty list to disable xticks.
1385-
1377+
ticks : array-like, optional
1378+
The list of xtick locations. Passing an empty list removes all xticks.
13861379
labels : array-like, optional
1387-
A list of explicit labels to place at the given *locs*.
1388-
1380+
The labels to place at the given *locs*.
13891381
**kwargs
13901382
`.Text` properties can be used to control the appearance of the labels.
13911383
13921384
Returns
13931385
-------
13941386
locs
1395-
An array of label locations.
1387+
The list of xtick locations.
13961388
labels
1397-
A list of `.Text` objects.
1389+
The list of xlabel `.Text` objects.
13981390
13991391
Notes
14001392
-----
@@ -1447,29 +1439,21 @@ def yticks(ticks=None, labels=None, **kwargs):
14471439
"""
14481440
Get or set the current tick locations and labels of the y-axis.
14491441
1450-
Call signatures::
1451-
1452-
locs, labels = yticks() # Get locations and labels
1453-
yticks(ticks, [labels], **kwargs) # Set locations and labels
1454-
14551442
Parameters
14561443
----------
1457-
ticks : array-like
1458-
A list of positions at which ticks should be placed. You can pass an
1459-
empty list to disable yticks.
1460-
1444+
ticks : array-like, optional
1445+
The list of xtick locations. Passing an empty list removes all xticks.
14611446
labels : array-like, optional
1462-
A list of explicit labels to place at the given *locs*.
1463-
1447+
The labels to place at the given *locs*.
14641448
**kwargs
14651449
`.Text` properties can be used to control the appearance of the labels.
14661450
14671451
Returns
14681452
-------
14691453
locs
1470-
An array of label locations.
1454+
The list of ytick locations.
14711455
labels
1472-
A list of `.Text` objects.
1456+
The list of ylabel `.Text` objects.
14731457
14741458
Notes
14751459
-----

0 commit comments

Comments
 (0)