-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathcolorbar.pyi
More file actions
139 lines (133 loc) · 4.85 KB
/
colorbar.pyi
File metadata and controls
139 lines (133 loc) · 4.85 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import matplotlib.spines as mspines
from matplotlib import cm, collections, colors, contour, colorizer
from matplotlib.axes import Axes
from matplotlib.axis import Axis
from matplotlib.backend_bases import RendererBase
from matplotlib.patches import Patch
from matplotlib.ticker import Locator, Formatter
from matplotlib.transforms import Bbox
import numpy as np
from numpy.typing import ArrayLike
from collections.abc import Sequence
from typing import Any, Literal, overload
from .typing import ColorType
class _ColorbarSpine(mspines.Spines):
def __init__(self, axes: Axes): ...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:...
def set_xy(self, xy: ArrayLike) -> None: ...
def draw(self, renderer: RendererBase | None) -> None:...
class Colorbar:
n_rasterize: int
mappable: cm.ScalarMappable | colorizer.ColorizingArtist
ax: Axes
alpha: float | None
cmap: colors.Colormap
norm: colors.Normalize
values: Sequence[float] | None
boundaries: Sequence[float] | None
extend: Literal["neither", "both", "min", "max"]
spacing: Literal["uniform", "proportional"]
orientation: Literal["vertical", "horizontal"]
drawedges: bool
extendfrac: Literal["auto"] | float | Sequence[float] | None
extendrect: bool
solids: None | collections.QuadMesh
solids_patches: list[Patch]
lines: list[collections.LineCollection]
outline: _ColorbarSpine
dividers: collections.LineCollection
ticklocation: Literal["left", "right", "top", "bottom"]
def __init__(
self,
ax: Axes,
mappable: cm.ScalarMappable | colorizer.ColorizingArtist | None = ...,
*,
cmap: str | colors.Colormap | None = ...,
norm: colors.Normalize | None = ...,
alpha: float | None = ...,
values: Sequence[float] | None = ...,
boundaries: Sequence[float] | None = ...,
orientation: Literal["vertical", "horizontal"] | None = ...,
ticklocation: Literal["auto", "left", "right", "top", "bottom"] = ...,
extend: Literal["neither", "both", "min", "max"] | None = ...,
spacing: Literal["uniform", "proportional"] = ...,
ticks: Sequence[float] | Locator | None = ...,
format: str | Formatter | None = ...,
drawedges: bool = ...,
extendfrac: Literal["auto"] | float | Sequence[float] | None = ...,
extendrect: bool = ...,
label: str = ...,
location: Literal["left", "right", "top", "bottom"] | None = ...
) -> None: ...
@property
def long_axis(self) -> Axis: ...
@property
def locator(self) -> Locator: ...
@locator.setter
def locator(self, loc: Locator) -> None: ...
@property
def minorlocator(self) -> Locator: ...
@minorlocator.setter
def minorlocator(self, loc: Locator) -> None: ...
@property
def formatter(self) -> Formatter: ...
@formatter.setter
def formatter(self, fmt: Formatter) -> None: ...
@property
def minorformatter(self) -> Formatter: ...
@minorformatter.setter
def minorformatter(self, fmt: Formatter) -> None: ...
def update_normal(self, mappable: cm.ScalarMappable | None = ...) -> None: ...
@overload
def add_lines(self, CS: contour.ContourSet, erase: bool = ...) -> None: ...
@overload
def add_lines(
self,
levels: ArrayLike,
colors: ColorType | Sequence[ColorType],
linewidths: float | ArrayLike,
erase: bool = ...,
) -> None: ...
def update_ticks(self) -> None: ...
def set_ticks(
self,
ticks: Sequence[float] | Locator,
*,
labels: Sequence[str] | None = ...,
minor: bool = ...,
**kwargs
) -> None: ...
def get_ticks(self, minor: bool = ...) -> np.ndarray: ...
def set_ticklabels(
self,
ticklabels: Sequence[str],
*,
minor: bool = ...,
**kwargs
) -> None: ...
def minorticks_on(self) -> None: ...
def minorticks_off(self) -> None: ...
def set_label(self, label: str, *, loc: str | None = ..., **kwargs) -> None: ...
def set_alpha(self, alpha: float | np.ndarray) -> None: ...
def remove(self) -> None: ...
def drag_pan(self, button: Any, key: Any, x: float, y: float) -> None: ...
ColorbarBase = Colorbar
def make_axes(
parents: Axes | list[Axes] | np.ndarray,
location: Literal["left", "right", "top", "bottom"] | None = ...,
orientation: Literal["vertical", "horizontal"] | None = ...,
fraction: float = ...,
shrink: float = ...,
aspect: float = ...,
**kwargs
) -> tuple[Axes, dict[str, Any]]: ...
def make_axes_gridspec(
parent: Axes,
*,
location: Literal["left", "right", "top", "bottom"] | None = ...,
orientation: Literal["vertical", "horizontal"] | None = ...,
fraction: float = ...,
shrink: float = ...,
aspect: float = ...,
**kwargs
) -> tuple[Axes, dict[str, Any]]: ...