forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontour.pyi
More file actions
140 lines (132 loc) · 5.16 KB
/
contour.pyi
File metadata and controls
140 lines (132 loc) · 5.16 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
140
import matplotlib.cm as cm
from matplotlib.artist import Artist
from matplotlib.axes import Axes
from matplotlib.collections import Collection
from matplotlib.colorizer import Colorizer, ColorizingArtist
from matplotlib.colors import Colormap, Normalize
from matplotlib.path import Path
from matplotlib.patches import Patch
from matplotlib.text import Text
from matplotlib.transforms import Transform, TransformedPatchPath, TransformedPath
from matplotlib.ticker import Locator, Formatter
from numpy.typing import ArrayLike
import numpy as np
from collections.abc import Callable, Iterable, Sequence
from typing import Literal
from .typing import ColorType
class ContourLabeler:
labelFmt: str | Formatter | Callable[[float], str] | dict[float, str]
labelManual: bool | Iterable[tuple[float, float]]
rightside_up: bool
labelLevelList: list[float]
labelIndiceList: list[int]
labelMappable: cm.ScalarMappable | ColorizingArtist
labelCValueList: list[ColorType]
labelXYs: list[tuple[float, float]]
def clabel(
self,
levels: ArrayLike | None = ...,
*,
fontsize: str | float | None = ...,
inline: bool = ...,
inline_spacing: float = ...,
fmt: str | Formatter | Callable[[float], str] | dict[float, str] | None = ...,
colors: ColorType | Sequence[ColorType] | None = ...,
use_clabeltext: bool = ...,
manual: bool | Iterable[tuple[float, float]] = ...,
rightside_up: bool = ...,
zorder: float | None = ...
) -> list[Text]: ...
def print_label(self, linecontour: ArrayLike, labelwidth: float) -> bool: ...
def too_close(self, x: float, y: float, lw: float) -> bool: ...
def get_text(
self,
lev: float,
fmt: str | Formatter | Callable[[float], str] | dict[float, str],
) -> str: ...
def locate_label(
self, linecontour: ArrayLike, labelwidth: float
) -> tuple[float, float, float]: ...
def add_label(
self, x: float, y: float, rotation: float, lev: float, cvalue: ColorType
) -> None: ...
def add_label_near(
self,
x: float,
y: float,
inline: bool = ...,
inline_spacing: int = ...,
transform: Transform | Literal[False] | None = ...,
) -> None: ...
def pop_label(self, index: int = ...) -> None: ...
def labels(self, inline: bool, inline_spacing: int) -> None: ...
def remove(self) -> None: ...
class ContourSet(ContourLabeler, Collection):
axes: Axes
levels: Iterable[float]
filled: bool
linewidths: float | ArrayLike | None
hatches: Iterable[str | None]
origin: Literal["upper", "lower", "image"] | None
extent: tuple[float, float, float, float] | None
colors: ColorType | Sequence[ColorType]
extend: Literal["neither", "both", "min", "max"]
nchunk: int
locator: Locator | None
logscale: bool
negative_linestyles: None | Literal[
"solid", "dashed", "dashdot", "dotted"
] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]
clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None
labelTexts: list[Text]
labelCValues: list[ColorType]
@property
def allkinds(self) -> list[list[np.ndarray | None]]: ...
@property
def allsegs(self) -> list[list[np.ndarray]]: ...
@property
def alpha(self) -> float | None: ...
@property
def linestyles(self) -> (
None |
Literal["solid", "dashed", "dashdot", "dotted"] |
Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]
): ...
def __init__(
self,
ax: Axes,
*args,
levels: Iterable[float] | None = ...,
filled: bool = ...,
linewidths: float | ArrayLike | None = ...,
linestyles: Literal["solid", "dashed", "dashdot", "dotted"]
| Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]
| None = ...,
hatches: Iterable[str | None] = ...,
alpha: float | None = ...,
origin: Literal["upper", "lower", "image"] | None = ...,
extent: tuple[float, float, float, float] | None = ...,
cmap: str | Colormap | None = ...,
colors: ColorType | Sequence[ColorType] | None = ...,
norm: str | Normalize | None = ...,
vmin: float | None = ...,
vmax: float | None = ...,
colorizer: Colorizer | None = ...,
extend: Literal["neither", "both", "min", "max"] = ...,
antialiased: bool | None = ...,
nchunk: int = ...,
locator: Locator | None = ...,
transform: Transform | None = ...,
negative_linestyles: Literal["solid", "dashed", "dashdot", "dotted"]
| Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]
| None = ...,
clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None = ...,
**kwargs
) -> None: ...
def legend_elements(
self, variable_name: str = ..., str_format: Callable[[float], str] = ...
) -> tuple[list[Artist], list[str]]: ...
def find_nearest_contour(
self, x: float, y: float, indices: Iterable[int] | None = ..., pixel: bool = ...
) -> tuple[int, int, int, float, float, float]: ...
class QuadContourSet(ContourSet): ...