Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccfbcfb

Browse files
committed
Deprecate get/set_*ticks minor positional use
1 parent d197f42 commit ccfbcfb

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
Using the parameter ``minor`` to ``get_*ticks()`` / ``set_*ticks()`` as a
4+
positional parameter is deprecated. It will become keyword-only in future
5+
versions.

lib/matplotlib/axes/_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,10 +3265,12 @@ def set_xscale(self, value, **kwargs):
32653265
ax.stale = True
32663266
self._request_autoscale_view(scaley=False)
32673267

3268+
@cbook._make_keyword_only("3.2", "minor")
32683269
def get_xticks(self, minor=False):
32693270
"""Return the x ticks as a list of locations"""
32703271
return self.xaxis.get_ticklocs(minor=minor)
32713272

3273+
@cbook._make_keyword_only("3.2", "minor")
32723274
def set_xticks(self, ticks, minor=False):
32733275
"""
32743276
Set the x ticks with list of *ticks*
@@ -3645,10 +3647,12 @@ def set_yscale(self, value, **kwargs):
36453647
ax.stale = True
36463648
self._request_autoscale_view(scalex=False)
36473649

3650+
@cbook._make_keyword_only("3.2", "minor")
36483651
def get_yticks(self, minor=False):
36493652
"""Return the y ticks as a list of locations"""
36503653
return self.yaxis.get_ticklocs(minor=minor)
36513654

3655+
@cbook._make_keyword_only("3.2", "minor")
36523656
def set_yticks(self, ticks, minor=False):
36533657
"""
36543658
Set the y ticks with list of *ticks*

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def apply_aspect(self, position=None):
161161
self._set_lims()
162162
super().apply_aspect(position)
163163

164+
@cbook._make_keyword_only("3.2", "minor")
164165
def set_ticks(self, ticks, minor=False):
165166
"""
166167
Set the x ticks with list of *ticks*

lib/matplotlib/axis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,6 +1753,7 @@ def set_ticklabels(self, ticklabels, *args, minor=False, **kwargs):
17531753
self.stale = True
17541754
return ret
17551755

1756+
@cbook._make_keyword_only("3.2", "minor")
17561757
def set_ticks(self, ticks, minor=False):
17571758
"""
17581759
Set the locations of the tick marks from sequence ticks

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ def set_zticks(self, *args, **kwargs):
853853
"""
854854
return self.zaxis.set_ticks(*args, **kwargs)
855855

856+
@cbook._make_keyword_only("3.2", "minor")
856857
def get_zticks(self, minor=False):
857858
"""
858859
Return the z ticks as a list of locations

0 commit comments

Comments
 (0)