This repository was archived by the owner on Feb 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathaxes.pyi
163 lines (157 loc) · 5.08 KB
/
axes.pyi
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
from typing import Union, Sequence, Tuple, List, Optional, TypeVar
from typing_extensions import Literal
import numpy as _np
from .artist import Artist, Line2D, LineCollection, Rectangle
from .collections import PolyCollection, PathCollection
from .color import Normalize
from .pyplot import Figure
from .legend import Legend
from .pyplot import Data, NumericArray
from .image import AxesImage
from .text import Text
_Float = TypeVar("_Float", _np.float32, _np.float64)
_LegendLocation = Literal[
"best",
"upper right",
"upper left",
"lower left",
"lower right",
"center left",
"center right",
"lower center",
"upper center",
"center",
]
class Axes:
title: Text
def axvline(
self,
x: float = ...,
ymin: float = ...,
ymax: float = ...,
color: str = ...,
linestyle: Literal["-", "--", "-.", ":", ""] = ...,
) -> Line2D: ...
def set_xlabel(self, xlabel: str) -> None: ...
def set_ylabel(self, ylabel: str) -> None: ...
def set_title(self, label: str, loc: Literal["left", "center", "right"] = ...) -> None: ...
def set_xticks(self, ticks: Union[_np.ndarray[_Float], Sequence[float]]) -> None: ...
def set_yticks(self, ticks: Union[_np.ndarray[_Float], Sequence[float]]) -> None: ...
def set_xticklabels(self, labels: List[str]) -> Text: ...
def set_yticklabels(self, labels: List[str]) -> Text: ...
def grid(
self,
b: Optional[bool] = ...,
which: Literal["major", "minor", "both"] = ...,
axis: Literal["both", "x", "y"] = ...,
) -> None: ...
def get_legend_handles_labels(
self,
) -> Tuple[List[Union[Artist, Tuple[Artist, ...]]], List[str]]: ...
def get_figure(self) -> Figure: ...
def legend(
self,
handles: Sequence[Union[Artist, Tuple[Artist, ...]]] = ...,
labels: Sequence[str] = ...,
loc: _LegendLocation = ...,
bbox_to_anchor: Tuple[float, float] = ...,
) -> Legend: ...
def errorbar(
self,
x: Data,
y: Data,
*,
barsabove: bool = ...,
capsize: float = ...,
capthick: float = ...,
color: Optional[str] = ...,
ecolor: str = ...,
elinewidth: float = ...,
errorevery: int = ...,
label: str = ...,
linestyle: Literal["-", "--", "-.", ":", ""] = ...,
lolims: bool = ...,
marker: str = ...,
markersize: float = ...,
uplims: bool = ...,
xerr: Optional[Data] = ...,
xlolims: bool = ...,
xuplims: bool = ...,
yerr: Optional[Data] = ...,
zorder: float = ...,
) -> Tuple[Line2D, Line2D, LineCollection]: ...
def bar(
self,
x: Data,
height: Data,
width: Data = ...,
bottom: Data = ...,
*,
align: Literal["center", "edge"] = ...,
color: Optional[str] = ...,
edgecolor: str = ...,
hatch: str = ...,
label: str = ...,
linewidth: float = ...,
zorder: float = ...,
) -> Tuple[Rectangle, ...]: ...
def imshow(
self, X: Data, cmap: str = ..., vmin: float = ..., vmax: float = ...
) -> AxesImage: ...
def hist(
self, x: Data, bins: Union[int, Sequence[float], _np.ndarray[_Float]]
) -> Tuple[List[_np.ndarray], _np.ndarray, List]: ...
def plot(
self,
x: Data,
y: Data,
*,
color: Optional[str] = ...,
label: str = ...,
linestyle: Literal["-", "--", "-.", ":", ""] = ...,
marker: str = ...,
markerfacecolor: str = ...,
markersize: float = ...,
scalex: bool = ...,
scaley: bool = ...,
zorder: float = ...,
) -> None: ...
def scatter(
self,
x: Data,
y: Data,
s: Optional[Union[float, Optional[NumericArray]]] = ...,
c: Optional[str] = ...,
cmap: Optional[str] = ...,
norm: Optional[Normalize] = ...,
vmin: Optional[float] = ...,
vmax: Optional[float] = ...,
marker: Optional[str] = ...,
alpha: Optional[float] = ...,
linewidths: Optional[float] = ...,
verts: Optional[List[Tuple]] = ...,
edgecolors: Optional[Union[Literal["face", "none"], str, Sequence[str]]] = ...,
*,
plotnonfinite: bool = ...,
data: Optional[Data] = ...,
label: str = ...,
) -> PathCollection: ...
def set_xlim(
self, xmin: float = ..., xmax: float = ..., auto: Optional[bool] = ...
) -> None: ...
def set_ylim(
self, ymin: float = ..., ymax: float = ..., auto: Optional[bool] = ...
) -> None: ...
def vlines(
self,
x: Union[_Float, NumericArray],
ymin: Union[_Float, NumericArray],
ymax: Union[_Float, NumericArray],
colors: Union[str, Union[List[str], Tuple[str]]] = ...,
linestyles: Literal["-", "--", "-.", ":", ""] = ...,
) -> LineCollection: ...
class SubplotBase(Axes):
def is_first_col(self) -> bool: ...
def is_first_row(self) -> bool: ...
def is_last_row(self) -> bool: ...
def is_last_col(self) -> bool: ...