8000 Use `ticks` instead of `locs` for arg to pyplot.{x,y}ticks · matplotlib/matplotlib@331120f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 331120f

Browse files
committed
Use ticks instead of locs for arg to pyplot.{x,y}ticks
1 parent 1ea943f commit 331120f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/matplotlib/pyplot.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,19 +1552,19 @@ def yscale(scale, **kwargs):
15521552
gca().set_yscale(scale, **kwargs)
15531553

15541554

1555-
def xticks(locs=None, labels=None, **kwargs):
1555+
def xticks(ticks=None, labels=None, **kwargs):
15561556
"""
15571557
Get or set the current tick locations and labels of the x-axis.
15581558
15591559
Call signatures::
15601560
15611561
locs, labels = xticks() # Get locations and labels
15621562
1563-
xticks(locs, [labels], **kwargs) # Set locations and labels
1563+
xticks(ticks, [labels], **kwargs) # Set locations and labels
15641564
15651565
Parameters
15661566
----------
1567-
locs : array_like
1567+
ticks : array_like
15681568
A list of positions at which ticks should be placed. You can pass an
15691569
empty list to disable xticks.
15701570
@@ -1614,14 +1614,14 @@ def xticks(locs=None, labels=None, **kwargs):
16141614
"""
16151615
ax = gca()
16161616

1617-
if locs is None and labels is None:
1617+
if ticks is None and labels is None:
16181618
locs = ax.get_xticks()
16191619
labels = ax.get_xticklabels()
16201620
elif labels is None:
1621-
locs = ax.set_xticks(locs)
1621+
locs = ax.set_xticks(ticks)
16221622
labels = ax.get_xticklabels()
16231623
else:
1624-
locs = ax.set_xticks(locs)
1624+
locs = ax.set_xticks(ticks)
16251625
labels = ax.set_xticklabels(labels, **kwargs)
16261626
if kwargs:
16271627
for l in labels:
@@ -1630,19 +1630,19 @@ def xticks(locs=None, labels=None, **kwargs):
16301630
return locs, silent_list('Text xticklabel', labels)
16311631

16321632

1633-
def yticks(locs=None, labels=None, **kwargs):
1633+
def yticks(ticks=None, labels=None, **kwargs):
16341634
"""
16351635
Get or set the current tick locations and labels of the y-axis.
16361636
16371637
Call signatures::
16381638
16391639
locs, labels = yticks() # Get locations and labels
16401640
1641-
yticks(locs, [labels], **kwargs) # Set locations and labels
1641+
yticks(ticks, [labels], **kwargs) # Set locations and labels
16421642
16431643
Parameters
16441644
----------
1645-
locs : array_like
1645+
ticks : array_like
16461646
A list of positions at which ticks should be placed. You can pass an
16471647
empty list to disable yticks.
16481648
@@ -1692,14 +1692,14 @@ def yticks(locs=None, labels=None, **kwargs):
16921692
"""
16931693
ax = gca()
16941694

1695-
if locs is None and labels is None:
1695+
if ticks is None and labels is None:
16961696
locs = ax.get_yticks()
16971697
labels = ax.get_yticklabels()
16981698
elif labels is None:
1699-
locs = ax.set_yticks(locs)
1699+
locs = ax.set_yticks(ticks)
17001700
labels = ax.get_yticklabels()
17011701
else:
1702-
locs = ax.set_yticks(locs)
1702+ locs = ax.set_yticks(ticks)
17031703
labels = ax.set_yticklabels(labels, **kwargs)
17041704
if kwargs:
17051705
for l in labels:

0 commit comments

Comments
 (0)
0