-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathcolorizer.pyi
More file actions
101 lines (92 loc) · 3.17 KB
/
colorizer.pyi
File metadata and controls
101 lines (92 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
from matplotlib import cbook, colorbar, colors, artist
import numpy as np
from numpy.typing import ArrayLike
class Colorizer:
colorbar: colorbar.Colorbar | None
callbacks: cbook.CallbackRegistry
def __init__(
self,
cmap: str | colors.Colormap | None = ...,
norm: str | colors.Norm | None = ...,
) -> None: ...
@property
def norm(self) -> colors.Norm: ...
@norm.setter
def norm(self, norm: colors.Norm | str | None) -> None: ...
def to_rgba(
self,
x: np.ndarray,
alpha: float | ArrayLike | None = ...,
bytes: bool = ...,
norm: bool = ...,
) -> np.ndarray: ...
def autoscale(self, A: ArrayLike) -> None: ...
def autoscale_None(self, A: ArrayLike) -> None: ...
@property
def cmap(self) -> colors.Colormap: ...
@cmap.setter
def cmap(self, cmap: colors.Colormap | str | None) -> None: ...
def get_clim(self) -> tuple[float, float]: ...
def set_clim(self, vmin: float | tuple[float, float] | None = ..., vmax: float | None = ...) -> None: ...
def changed(self) -> None: ...
@property
def vmin(self) -> float | None: ...
@vmin.setter
def vmin(self, value: float | None) -> None: ...
@property
def vmax(self) -> float | None: ...
@vmax.setter
def vmax(self, value: float | None) -> None: ...
@property
def clip(self) -> bool: ...
@clip.setter
def clip(self, value: bool) -> None: ...
class _ColorizerInterface:
cmap: colors.Colormap
colorbar: colorbar.Colorbar | None
callbacks: cbook.CallbackRegistry
def to_rgba(
self,
x: np.ndarray,
alpha: float | ArrayLike | None = ...,
bytes: bool = ...,
norm: bool = ...,
) -> np.ndarray: ...
def get_clim(self) -> tuple[float, float]: ...
def set_clim(self, vmin: float | tuple[float, float] | None = ..., vmax: float | None = ...) -> None: ...
def get_alpha(self) -> float | None: ...
def get_cmap(self) -> colors.Colormap: ...
def set_cmap(self, cmap: str | colors.Colormap) -> None: ...
@property
def norm(self) -> colors.Norm: ...
@norm.setter
def norm(self, norm: colors.Norm | str | None) -> None: ...
def set_norm(self, norm: colors.Norm | str | None) -> None: ...
def autoscale(self) -> None: ...
def autoscale_None(self) -> None: ...
class _ScalarMappable(_ColorizerInterface):
def __init__(
self,
norm: colors.Norm | None = ...,
cmap: str | colors.Colormap | None = ...,
*,
colorizer: Colorizer | None = ...,
**kwargs
) -> None: ...
def set_array(self, A: ArrayLike | None) -> None: ...
def get_array(self) -> np.ndarray | None: ...
def changed(self) -> None: ...
class ColorizingArtist(_ScalarMappable, artist.Artist):
callbacks: cbook.CallbackRegistry
def __init__(
self,
colorizer: Colorizer,
**kwargs
) -> None: ...
def set_array(self, A: ArrayLike | None) -> None: ...
def get_array(self) -> np.ndarray | None: ...
def changed(self) -> None: ...
@property
def colorizer(self) -> Colorizer: ...
@colorizer.setter
def colorizer(self, cl: Colorizer) -> None: ...