10000 Update scale.pyi · matplotlib/matplotlib@93bf34b · GitHub
[go: up one dir, main page]

Skip to content

Commit 93bf34b

Browse files
committed
Update scale.pyi
1 parent 1eea948 commit 93bf34b

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

lib/matplotlib/scale.pyi

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from matplotlib.axis import Axis
22
from matplotlib.transforms import Transform
33

44
from collections.abc import Callable, Iterable
5-
from typing import Literal
5+
from typing import Literal, Union
66
from numpy.typing import ArrayLike
77

88
class ScaleBase:
@@ -15,6 +15,7 @@ class ScaleBase:
1515

1616
class LinearScale(ScaleBase):
1717
name: str
18+
def __init__(self: ScaleBase, axis: Union[Axis, None] = None) -> None: ...
1819

1920
class FuncTransform(Transform):
2021
input_dims: int
@@ -56,12 +57,12 @@ class LogScale(ScaleBase):
5657
name: str
5758
subs: Iterable[int] | None
5859
def __init__(
59-
self,
60-
axis: Axis | None,
60+
self: LogScale,
61+
axis: Union[Axis, None] = None,
6162
*,
62-
base: float = ...,
63-
subs: Iterable[int] | None = ...,
64-
nonpositive: Literal["clip", "mask"] = ...
63+
base: float = 10,
64+
subs: Union[Iterable[int], None] = None,
65+
nonpositive: Union[Literal['clip'], Literal['mask']] = 'clip'
6566
) -> None: ...
6667
@property
6768
def base(self) -> float: ...
@@ -103,13 +104,13 @@ class SymmetricalLogScale(ScaleBase):
103104
name: str
104105
subs: Iterable[int] | None
105106
def __init__(
106-
self,
107-
axis: Axis | None,
107+
self: SymmetricalLogScale,
108+
axis: Union[Axis, None] = None,
108109
*,
109-
base: float = ...,
110-
linthresh: float = ...,
111-
subs: Iterable[int] | None = ...,
112-
linscale: float = ...
110+
base: float = 10,
111+
linthresh: float = 2,
112+
subs: Union[Iterable[int], None] = None,
113+
linscale: float = 1
113114
) -> None: ...
114115
@property
115116
def base(self) -> float: ...
@@ -164,15 +165,16 @@ class LogisticTransform(Transform):
164165
class LogitScale(ScaleBase):
165166
name: str
166167
def __init__(
167-
self,
168-
axis: Axis | None,
169-
nonpositive: Literal["mask", "clip"] = ...,
168+
self: LogitScale,
169+
axis: Union[Axis, None] = None,
170+
nonpositive: Union[Literal['mask'], Literal['clip']] = 'mask',
170171
*,
171-
one_half: str = ...,
172-
use_overline: bool = ...
172+
one_half: str = '\\frac{1}{2}',
173+
use_overline: bool = False
173174
) -> None: ...
174175
def ge 51BF t_transform(self) -> LogitTransform: ...
175176

176177
def get_scale_names() -> list[str]: ...
177178
def scale_factory(scale: str, axis: Axis, **kwargs) -> ScaleBase: ...
178179
def register_scale(scale_class: type[ScaleBase]) -> None: ...
180+
def handle_axis_parameter(init_func: Callable[..., None]) -> Callable[..., None]: ...

0 commit comments

Comments
 (0)
0