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

Skip to content

Commit f6b8a1b

Browse files
committed
numticks kwonly, doc removal of set_label
1 parent 8aafa3a commit f6b8a1b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/api/next_api_changes/removals/28183-OG.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
``Tick.set_label1`` and ``Tick.set_label2``
2-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1+
``Tick.set_label``, ``Tick.set_label1`` and ``Tick.set_label2``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
... are removed. Calling these methods from third-party code usually had no
44
effect, as the labels are overwritten at draw time by the tick formatter.
55

@@ -52,6 +52,10 @@ consistently with ``_ImageBase.set_filterrad``.
5252
The only parameter of ``Annotation.contains`` and ``Legend.contains`` is renamed to *mouseevent*
5353
consistently with `.Artist.contains`.
5454

55+
Method parameters renamed
56+
~~~~~~~~~~~~~~~~~~~~~~~~~
57+
58+
The *p* parameter of ``BboxBase.padded`` is renamed to *w_pad*, consistently with the other parameter, *h_pad*
5559

5660
*numdecs* parameter and attribute of ``LogLocator``
5761
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lib/matplotlib/ticker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,7 +2275,7 @@ class LogLocator(Locator):
22752275
Places ticks at the values ``subs[j] * base**i``.
22762276
"""
22772277

2278-
def __init__(self, base=10.0, subs=(1.0,), numticks=None):
2278+
def __init__(self, base=10.0, subs=(1.0,), *, numticks=None):
22792279
"""
22802280
Parameters
22812281
----------
@@ -2306,7 +2306,7 @@ def __init__(self, base=10.0, subs=(1.0,), numticks=None):
23062306
self._set_subs(subs)
23072307
self.numticks = numticks
23082308

2309-
def set_params(self, base=None, subs=None, numticks=None):
2309+
def set_params(self, base=None, subs=None, *, numticks=None):
23102310
"""Set parameters within this locator."""
23112311
if base is not None:
23122312
self._base = float(base)

lib/matplotlib/ticker.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,14 @@ class LogLocator(Locator):
236236
self,
237237
base: float = ...,
238238
subs: None | Literal["auto", "all"] | Sequence[float] = ...,
239+
*,
239240
numticks: int | None = ...,
240241
) -> None: ...
241242
def set_params(
242243
self,
243244
base: float | None = ...,
244245
subs: Literal["auto", "all"] | Sequence[float] | None = ...,
246+
*,
245247
numticks: int | None = ...,
246248
) -> None: ...
247249

0 commit comments

Comments
 (0)