plotly-stubs 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plotly-stubs/__init__.pyi +41 -0
- plotly-stubs/basedatatypes.pyi +416 -0
- plotly-stubs/callbacks.pyi +80 -0
- plotly-stubs/colors/__init__.pyi +35 -0
- plotly-stubs/express/__init__.pyi +95 -0
- plotly-stubs/express/colors/__init__.pyi +69 -0
- plotly-stubs/graph_objects/__init__.pyi +259 -0
- plotly-stubs/graph_objs/__init__.pyi +262 -0
- plotly-stubs/graph_objs/_bar.pyi +477 -0
- plotly-stubs/graph_objs/_box.pyi +536 -0
- plotly-stubs/graph_objs/_contour.pyi +448 -0
- plotly-stubs/graph_objs/_figure.pyi +3926 -0
- plotly-stubs/graph_objs/_heatmap.pyi +436 -0
- plotly-stubs/graph_objs/_layout.pyi +545 -0
- plotly-stubs/graph_objs/_scatter.pyi +450 -0
- plotly-stubs/graph_objs/_surface.pyi +385 -0
- plotly-stubs/graph_objs/bar/__init__.pyi +46 -0
- plotly-stubs/graph_objs/bar/_stream.pyi +23 -0
- plotly-stubs/graph_objs/bar/selected/__init__.pyi +7 -0
- plotly-stubs/graph_objs/bar/selected/_marker.pyi +23 -0
- plotly-stubs/graph_objs/bar/selected/_textfont.pyi +18 -0
- plotly-stubs/graph_objs/bar/unselected/__init__.pyi +4 -0
- plotly-stubs/graph_objs/bar/unselected/_marker.pyi +23 -0
- plotly-stubs/graph_objs/bar/unselected/_textfont.pyi +18 -0
- plotly-stubs/graph_objs/barpolar/__init__.pyi +38 -0
- plotly-stubs/graph_objs/box/__init__.pyi +38 -0
- plotly-stubs/graph_objs/box/_line.pyi +23 -0
- plotly-stubs/graph_objs/box/selected/__init__.pyi +3 -0
- plotly-stubs/graph_objs/box/selected/_marker.pyi +28 -0
- plotly-stubs/graph_objs/box/unselected/__init__.pyi +3 -0
- plotly-stubs/graph_objs/box/unselected/_marker.pyi +28 -0
- plotly-stubs/graph_objs/candlestick/__init__.pyi +36 -0
- plotly-stubs/graph_objs/carpet/__init__.pyi +32 -0
- plotly-stubs/graph_objs/choropleth/__init__.pyi +42 -0
- plotly-stubs/graph_objs/choropleth/selected/__init__.pyi +5 -0
- plotly-stubs/graph_objs/choropleth/selected/_marker.pyi +23 -0
- plotly-stubs/graph_objs/choropleth/unselected/__init__.pyi +5 -0
- plotly-stubs/graph_objs/choropleth/unselected/_marker.pyi +23 -0
- plotly-stubs/graph_objs/choroplethmap/__init__.pyi +42 -0
- plotly-stubs/graph_objs/choroplethmapbox/__init__.pyi +40 -0
- plotly-stubs/graph_objs/cone/__init__.pyi +34 -0
- plotly-stubs/graph_objs/contour/__init__.pyi +38 -0
- plotly-stubs/graph_objs/contourcarpet/__init__.pyi +32 -0
- plotly-stubs/graph_objs/densitymap/__init__.pyi +30 -0
- plotly-stubs/graph_objs/densitymapbox/__init__.pyi +30 -0
- plotly-stubs/graph_objs/funnel/__init__.pyi +40 -0
- plotly-stubs/graph_objs/funnelarea/__init__.pyi +40 -0
- plotly-stubs/graph_objs/graph_objs_disabled.pyi +1 -0
- plotly-stubs/graph_objs/heatmap/__init__.pyi +32 -0
- plotly-stubs/graph_objs/histogram/__init__.pyi +54 -0
- plotly-stubs/graph_objs/histogram2d/__init__.pyi +38 -0
- plotly-stubs/graph_objs/histogram2dcontour/__init__.pyi +44 -0
- plotly-stubs/graph_objs/icicle/__init__.pyi +48 -0
- plotly-stubs/graph_objs/image/__init__.pyi +26 -0
- plotly-stubs/graph_objs/indicator/__init__.pyi +40 -0
- plotly-stubs/graph_objs/isosurface/__init__.pyi +48 -0
- plotly-stubs/graph_objs/layout/__init__.pyi +122 -0
- plotly-stubs/graph_objs/layout/newselection/__init__.pyi +5 -0
- plotly-stubs/graph_objs/layout/newselection/_line.pyi +28 -0
- plotly-stubs/graph_objs/mesh3d/__init__.pyi +36 -0
- plotly-stubs/graph_objs/ohlc/__init__.pyi +36 -0
- plotly-stubs/graph_objs/parcats/__init__.pyi +34 -0
- plotly-stubs/graph_objs/parcoords/__init__.pyi +40 -0
- plotly-stubs/graph_objs/pie/__init__.pyi +42 -0
- plotly-stubs/graph_objs/sankey/__init__.pyi +38 -0
- plotly-stubs/graph_objs/scatter/__init__.pyi +47 -0
- plotly-stubs/graph_objs/scatter/marker/__init__.pyi +24 -0
- plotly-stubs/graph_objs/scatter/marker/colorbar/__init__.pyi +24 -0
- plotly-stubs/graph_objs/scatter/marker/colorbar/title/__init__.pyi +5 -0
- plotly-stubs/graph_objs/scatter/selected/__init__.pyi +7 -0
- plotly-stubs/graph_objs/scatter/selected/_marker.pyi +28 -0
- plotly-stubs/graph_objs/scatter/selected/_textfont.pyi +18 -0
- plotly-stubs/graph_objs/scatter/unselected/__init__.pyi +7 -0
- plotly-stubs/graph_objs/scatter/unselected/_marker.pyi +28 -0
- plotly-stubs/graph_objs/scatter/unselected/_textfont.pyi +18 -0
- plotly-stubs/graph_objs/scatter3d/__init__.pyi +46 -0
- plotly-stubs/graph_objs/scattercarpet/__init__.pyi +42 -0
- plotly-stubs/graph_objs/scattergeo/__init__.pyi +42 -0
- plotly-stubs/graph_objs/scattergl/__init__.pyi +46 -0
- plotly-stubs/graph_objs/scattermap/__init__.pyi +44 -0
- plotly-stubs/graph_objs/scattermapbox/__init__.pyi +44 -0
- plotly-stubs/graph_objs/scatterpolar/__init__.pyi +42 -0
- plotly-stubs/graph_objs/scatterpolargl/__init__.pyi +42 -0
- plotly-stubs/graph_objs/scattersmith/__init__.pyi +42 -0
- plotly-stubs/graph_objs/scatterternary/__init__.pyi +42 -0
- plotly-stubs/graph_objs/splom/__init__.pyi +44 -0
- plotly-stubs/graph_objs/streamtube/__init__.pyi +36 -0
- plotly-stubs/graph_objs/subplots.pyi +26 -0
- plotly-stubs/graph_objs/sunburst/__init__.pyi +42 -0
- plotly-stubs/graph_objs/surface/__init__.pyi +38 -0
- plotly-stubs/graph_objs/table/__init__.pyi +36 -0
- plotly-stubs/graph_objs/treemap/__init__.pyi +46 -0
- plotly-stubs/graph_objs/violin/__init__.pyi +46 -0
- plotly-stubs/graph_objs/volume/__init__.pyi +48 -0
- plotly-stubs/graph_objs/waterfall/__init__.pyi +48 -0
- plotly-stubs/io/__init__.pyi +42 -0
- plotly-stubs/offline/__init__.pyi +38 -0
- plotly-stubs/offline/_plotlyjs_version.pyi +1 -0
- plotly-stubs/py.typed +0 -0
- plotly-stubs/subplots.pyi +25 -0
- plotly-stubs/utils.pyi +46 -0
- plotly_stubs-0.0.1.dist-info/METADATA +198 -0
- plotly_stubs-0.0.1.dist-info/RECORD +105 -0
- plotly_stubs-0.0.1.dist-info/WHEEL +4 -0
- plotly_stubs-0.0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import plotly.colors as colors
|
|
5
|
+
import plotly.data as data
|
|
6
|
+
import plotly.graph_objs as graph_objs
|
|
7
|
+
import plotly.io as io
|
|
8
|
+
import plotly.offline as offline
|
|
9
|
+
import plotly.tools as tools
|
|
10
|
+
import plotly.utils as utils
|
|
11
|
+
from plotly.graph_objs import Figure
|
|
12
|
+
from plotly.version import __version__
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"__version__",
|
|
16
|
+
"colors",
|
|
17
|
+
"data",
|
|
18
|
+
"graph_objs",
|
|
19
|
+
"io",
|
|
20
|
+
"offline",
|
|
21
|
+
"tools",
|
|
22
|
+
"utils",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
def plot(
|
|
26
|
+
data_frame: pd.DataFrame,
|
|
27
|
+
kind: str,
|
|
28
|
+
**kwargs: Any,
|
|
29
|
+
) -> Figure: ...
|
|
30
|
+
def boxplot_frame(
|
|
31
|
+
data_frame: pd.DataFrame,
|
|
32
|
+
**kwargs: Any,
|
|
33
|
+
) -> Figure: ...
|
|
34
|
+
def hist_frame(
|
|
35
|
+
data_frame: pd.DataFrame,
|
|
36
|
+
**kwargs: Any,
|
|
37
|
+
) -> Figure: ...
|
|
38
|
+
def hist_series(
|
|
39
|
+
data_frame: pd.DataFrame,
|
|
40
|
+
**kwargs: Any,
|
|
41
|
+
) -> Figure: ...
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from collections import OrderedDict
|
|
3
|
+
from collections.abc import Callable, Generator, Iterator, Sequence
|
|
4
|
+
from contextlib import contextmanager
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from plotly._subplots import SubplotDomain, SubplotXY
|
|
9
|
+
from plotly.callbacks import BoxSelector, InputDeviceState, LassoSelector, Points
|
|
10
|
+
from plotly.graph_objs import Figure, Layout
|
|
11
|
+
from plotly.graph_objs.layout import Annotation
|
|
12
|
+
|
|
13
|
+
Undefined = ...
|
|
14
|
+
|
|
15
|
+
class BaseFigure:
|
|
16
|
+
_bracket_re = ...
|
|
17
|
+
_valid_underscore_properties = ...
|
|
18
|
+
_set_trace_uid = ...
|
|
19
|
+
_allow_disable_validation = ...
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
data: Sequence[BaseTraceType] | Sequence[dict[str, Any]] | BaseTraceType | BaseFigure | dict[str, Any] = ...,
|
|
23
|
+
layout_plotly: BaseLayoutType | dict[str, Any] = ...,
|
|
24
|
+
frames: Sequence[BaseFrameHierarchyType] | dict[str, Any] = ...,
|
|
25
|
+
skip_invalid: bool = ...,
|
|
26
|
+
**kwargs: Any,
|
|
27
|
+
) -> None: ...
|
|
28
|
+
def __reduce__(self) -> tuple[type[BaseFigure], tuple[dict[str, Any]]]: ...
|
|
29
|
+
def __setitem__(self, prop: str, value: Any) -> None: ...
|
|
30
|
+
def __setattr__(self, prop: str, value: Any) -> None: ...
|
|
31
|
+
def __getitem__(self, prop: str) -> Any: ...
|
|
32
|
+
def __iter__(self) -> Iterator[str]: # -> Iterator[Literal['data', 'layout', 'frames']]:
|
|
33
|
+
...
|
|
34
|
+
def __contains__(self, prop: str) -> bool: ...
|
|
35
|
+
def __eq__(self, other: object) -> bool: ...
|
|
36
|
+
def update(
|
|
37
|
+
self,
|
|
38
|
+
dict1: dict[str, Any] = ...,
|
|
39
|
+
overwrite: bool = ...,
|
|
40
|
+
**kwargs: Any,
|
|
41
|
+
) -> BaseFigure: # -> Self:
|
|
42
|
+
...
|
|
43
|
+
def pop(self, key: str, dflt: Any | None = ...) -> Any: ...
|
|
44
|
+
@property
|
|
45
|
+
def data(self) -> Sequence[BaseTraceType]: ...
|
|
46
|
+
@data.setter
|
|
47
|
+
def data(self, new_data: Sequence[BaseTraceType]) -> None: ...
|
|
48
|
+
def select_traces(
|
|
49
|
+
self,
|
|
50
|
+
selector: dict[str, Any] | Callable[[BaseTraceType], bool] | int | str | None = ...,
|
|
51
|
+
row: int | None = ...,
|
|
52
|
+
col: int | None = ...,
|
|
53
|
+
secondary_y: bool | None = ...,
|
|
54
|
+
) -> Generator[BaseTraceType, None, None]: ...
|
|
55
|
+
def for_each_trace(
|
|
56
|
+
self,
|
|
57
|
+
fn: Callable[[BaseTraceType], Any],
|
|
58
|
+
selector: dict[str, Any] | Callable[[BaseTraceType], bool] | int | str | None = ...,
|
|
59
|
+
row: int | None = ...,
|
|
60
|
+
col: int | None = ...,
|
|
61
|
+
secondary_y: bool | None = ...,
|
|
62
|
+
) -> BaseFigure: # -> Self:
|
|
63
|
+
...
|
|
64
|
+
def update_traces(
|
|
65
|
+
self,
|
|
66
|
+
patch: dict[str, Any] | None = ...,
|
|
67
|
+
selector: dict[str, Any] | Callable[[BaseTraceType], bool] | int | str | None = ...,
|
|
68
|
+
row: int | None = ...,
|
|
69
|
+
col: int | None = ...,
|
|
70
|
+
secondary_y: bool | None = ...,
|
|
71
|
+
overwrite: bool = ...,
|
|
72
|
+
**kwargs: Any,
|
|
73
|
+
) -> BaseFigure: # -> Self:
|
|
74
|
+
...
|
|
75
|
+
def update_layout(
|
|
76
|
+
self,
|
|
77
|
+
dict1: dict[str, Any] = ...,
|
|
78
|
+
overwrite: bool = ...,
|
|
79
|
+
**kwargs: Any,
|
|
80
|
+
) -> BaseFigure: # -> Self:
|
|
81
|
+
...
|
|
82
|
+
def plotly_restyle(
|
|
83
|
+
self,
|
|
84
|
+
restyle_data: dict[str, Any | Sequence[Any]],
|
|
85
|
+
trace_indexes: int | Sequence[int] | None = ...,
|
|
86
|
+
**kwargs: Any,
|
|
87
|
+
) -> None: ...
|
|
88
|
+
def add_trace(
|
|
89
|
+
self,
|
|
90
|
+
trace: BaseTraceType | dict[str, Any],
|
|
91
|
+
row: int | str | None = ...,
|
|
92
|
+
col: int | str | None = ...,
|
|
93
|
+
secondary_y: bool | None = ...,
|
|
94
|
+
exclude_empty_subplots: bool = ...,
|
|
95
|
+
) -> BaseFigure: # -> Self:
|
|
96
|
+
...
|
|
97
|
+
def add_traces(
|
|
98
|
+
self,
|
|
99
|
+
data: Sequence[BaseTraceType | dict[str, Any]],
|
|
100
|
+
rows: Sequence[int] | int | None = ...,
|
|
101
|
+
cols: Sequence[int] | int | None = ...,
|
|
102
|
+
secondary_ys: Sequence[bool] | None = ...,
|
|
103
|
+
exclude_empty_subplots: bool = ...,
|
|
104
|
+
) -> BaseFigure: # -> Self:
|
|
105
|
+
...
|
|
106
|
+
def print_grid(self) -> None: ...
|
|
107
|
+
def append_trace(
|
|
108
|
+
self,
|
|
109
|
+
trace: BaseTraceType,
|
|
110
|
+
row: int,
|
|
111
|
+
col: int,
|
|
112
|
+
) -> None: ...
|
|
113
|
+
def get_subplot(
|
|
114
|
+
self,
|
|
115
|
+
row: int,
|
|
116
|
+
col: int,
|
|
117
|
+
secondary_y: bool = ...,
|
|
118
|
+
) -> (
|
|
119
|
+
BaseLayoutHierarchyType | SubplotDomain | SubplotXY | None
|
|
120
|
+
): # -> Scene | Polar | Ternary | Mapbox | SubplotDomain | SubplotXY | None:
|
|
121
|
+
...
|
|
122
|
+
@property
|
|
123
|
+
def layout(self) -> Layout: # -> Layout:
|
|
124
|
+
...
|
|
125
|
+
@layout.setter
|
|
126
|
+
def layout(self, new_layout: Layout) -> None: ...
|
|
127
|
+
def plotly_relayout(
|
|
128
|
+
self,
|
|
129
|
+
relayout_data: dict[str, Any],
|
|
130
|
+
**kwargs: Any,
|
|
131
|
+
) -> None: ...
|
|
132
|
+
@property
|
|
133
|
+
def frames(self) -> Sequence[BaseFrameHierarchyType]: # -> tuple[plotly.graph_objs.Frame]
|
|
134
|
+
...
|
|
135
|
+
@frames.setter
|
|
136
|
+
def frames(self, new_frames: Sequence[BaseFrameHierarchyType]) -> None: ...
|
|
137
|
+
def plotly_update(
|
|
138
|
+
self,
|
|
139
|
+
restyle_data: dict[str, Any] = ...,
|
|
140
|
+
relayout_data: dict[str, Any] = ...,
|
|
141
|
+
trace_indexes: int | Sequence[int] | None = ...,
|
|
142
|
+
**kwargs: Any,
|
|
143
|
+
) -> None: ...
|
|
144
|
+
@contextmanager
|
|
145
|
+
def batch_update(self) -> Generator[None, Any, None]: ...
|
|
146
|
+
@contextmanager
|
|
147
|
+
def batch_animate(
|
|
148
|
+
self,
|
|
149
|
+
duration: int | float = ...,
|
|
150
|
+
easing: str = ...,
|
|
151
|
+
) -> Generator[None, Any, None]: ...
|
|
152
|
+
def to_dict(self) -> dict[str, Any]: ...
|
|
153
|
+
def to_plotly_json(self) -> dict[str, Any]: ...
|
|
154
|
+
def to_ordered_dict(self, skip_uid: bool = ...) -> OrderedDict[str, Any]: ...
|
|
155
|
+
def show(
|
|
156
|
+
self,
|
|
157
|
+
renderer: str | None = ...,
|
|
158
|
+
validate: bool = ...,
|
|
159
|
+
width: int | float = ...,
|
|
160
|
+
height: int | float = ...,
|
|
161
|
+
config: dict[str, Any] = ...,
|
|
162
|
+
) -> None: ...
|
|
163
|
+
def to_json(
|
|
164
|
+
self,
|
|
165
|
+
validate: bool = ...,
|
|
166
|
+
pretty: bool = ...,
|
|
167
|
+
remove_uids: bool = ...,
|
|
168
|
+
engine: str | None = ...,
|
|
169
|
+
) -> str: ...
|
|
170
|
+
def full_figure_for_development(
|
|
171
|
+
self,
|
|
172
|
+
warn: bool = ...,
|
|
173
|
+
as_dict: bool = ...,
|
|
174
|
+
) -> Figure | dict[str, Any]: ...
|
|
175
|
+
def write_json(
|
|
176
|
+
self,
|
|
177
|
+
file: Path | os.PathLike[str],
|
|
178
|
+
pretty: bool = ...,
|
|
179
|
+
remove_uids: bool = ...,
|
|
180
|
+
engine: str | None = ...,
|
|
181
|
+
) -> None: ...
|
|
182
|
+
def to_html(
|
|
183
|
+
self,
|
|
184
|
+
config: dict[str, Any] | None = ...,
|
|
185
|
+
auto_play: bool = ...,
|
|
186
|
+
include_plotlyjs: bool | str = ...,
|
|
187
|
+
include_mathjax: bool | str = ...,
|
|
188
|
+
post_script: str | Sequence[str] | None = ...,
|
|
189
|
+
full_html: bool = ...,
|
|
190
|
+
animation_opts: dict[str, Any] | None = ...,
|
|
191
|
+
default_width: int | float | str = ...,
|
|
192
|
+
default_height: int | float | str = ...,
|
|
193
|
+
validate: bool = ...,
|
|
194
|
+
div_id: str | None = ...,
|
|
195
|
+
) -> str: ...
|
|
196
|
+
def write_html(
|
|
197
|
+
self,
|
|
198
|
+
file: Path | os.PathLike[str],
|
|
199
|
+
config: dict[str, Any] | None = ...,
|
|
200
|
+
auto_play: bool = ...,
|
|
201
|
+
include_plotlyjs: bool | str = ...,
|
|
202
|
+
include_mathjax: bool | str = ...,
|
|
203
|
+
post_script: str | Sequence[str] | None = ...,
|
|
204
|
+
full_html: bool = ...,
|
|
205
|
+
animation_opts: dict[str, Any] | None = ...,
|
|
206
|
+
default_width: int | float | str = ...,
|
|
207
|
+
default_height: int | float | str = ...,
|
|
208
|
+
validate: bool = ...,
|
|
209
|
+
auto_open: bool = ...,
|
|
210
|
+
div_id: str | None = ...,
|
|
211
|
+
) -> None: ...
|
|
212
|
+
def to_image(
|
|
213
|
+
self,
|
|
214
|
+
format: str | None = ...,
|
|
215
|
+
width: int | None = ...,
|
|
216
|
+
height: int | None = ...,
|
|
217
|
+
scale: int | float | None = ...,
|
|
218
|
+
validate: bool = ...,
|
|
219
|
+
engine: str = ...,
|
|
220
|
+
) -> bytes: ...
|
|
221
|
+
def write_image(
|
|
222
|
+
self,
|
|
223
|
+
file: Path | os.PathLike[str],
|
|
224
|
+
format: str | None = ...,
|
|
225
|
+
width: int | None = ...,
|
|
226
|
+
height: int | None = ...,
|
|
227
|
+
scale: int | float | None = ...,
|
|
228
|
+
validate: bool = ...,
|
|
229
|
+
engine: str = ...,
|
|
230
|
+
) -> None: ...
|
|
231
|
+
def add_vline(
|
|
232
|
+
self,
|
|
233
|
+
x: int | float,
|
|
234
|
+
row: int | str | None = ...,
|
|
235
|
+
col: int | str | None = ...,
|
|
236
|
+
exclude_empty_subplots: bool = ...,
|
|
237
|
+
annotation: Annotation | dict[str, Any] = ...,
|
|
238
|
+
**kwargs: Any,
|
|
239
|
+
) -> BaseFigure: # -> Self:
|
|
240
|
+
...
|
|
241
|
+
def add_hline(
|
|
242
|
+
self,
|
|
243
|
+
y: int | float,
|
|
244
|
+
row: int | str | None = ...,
|
|
245
|
+
col: int | str | None = ...,
|
|
246
|
+
exclude_empty_subplots: bool = ...,
|
|
247
|
+
annotation: Annotation | dict[str, Any] = ...,
|
|
248
|
+
**kwargs: Any,
|
|
249
|
+
) -> BaseFigure: # -> Self:
|
|
250
|
+
...
|
|
251
|
+
def add_vrect(
|
|
252
|
+
self,
|
|
253
|
+
x0: int | float,
|
|
254
|
+
x1: int | float,
|
|
255
|
+
row: int | str | None = ...,
|
|
256
|
+
col: int | str | None = ...,
|
|
257
|
+
exclude_empty_subplots: bool = ...,
|
|
258
|
+
annotation: Annotation | dict[str, Any] = ...,
|
|
259
|
+
**kwargs: Any,
|
|
260
|
+
) -> BaseFigure: # -> Self:
|
|
261
|
+
...
|
|
262
|
+
def add_hrect(
|
|
263
|
+
self,
|
|
264
|
+
y0: int | float,
|
|
265
|
+
y1: int | float,
|
|
266
|
+
row: int | str | None = ...,
|
|
267
|
+
col: int | str | None = ...,
|
|
268
|
+
exclude_empty_subplots: bool = ...,
|
|
269
|
+
annotation: Annotation | dict[str, Any] = ...,
|
|
270
|
+
**kwargs: Any,
|
|
271
|
+
) -> BaseFigure: # -> Self:
|
|
272
|
+
...
|
|
273
|
+
def set_subplots(
|
|
274
|
+
self,
|
|
275
|
+
rows: int = ...,
|
|
276
|
+
cols: int = ...,
|
|
277
|
+
shared_xaxes: bool | str = ...,
|
|
278
|
+
shared_yaxes: bool | str = ...,
|
|
279
|
+
start_cell: str = ...,
|
|
280
|
+
print_grid: bool = ...,
|
|
281
|
+
horizontal_spacing: float = ...,
|
|
282
|
+
vertical_spacing: float = ...,
|
|
283
|
+
subplot_titles: list[str] | None = ...,
|
|
284
|
+
column_widths: list[float] | None = ...,
|
|
285
|
+
row_heights: list[float] | None = ...,
|
|
286
|
+
specs: list[list[dict[str, str | bool | int | float] | None]] | None = ...,
|
|
287
|
+
insets: list[dict[str, tuple[int, int] | str | float]] | None = ...,
|
|
288
|
+
column_titles: list[str] | None = ...,
|
|
289
|
+
row_titles: list[str] | None = ...,
|
|
290
|
+
x_title: str | None = ...,
|
|
291
|
+
y_title: str | None = ...,
|
|
292
|
+
figure: BaseFigure | None = ...,
|
|
293
|
+
**kwargs: Any,
|
|
294
|
+
) -> BaseFigure: ...
|
|
295
|
+
|
|
296
|
+
class BasePlotlyType:
|
|
297
|
+
_mapped_properties = ...
|
|
298
|
+
_parent_path_str = ...
|
|
299
|
+
_path_str = ...
|
|
300
|
+
_valid_props = ...
|
|
301
|
+
def __init__(
|
|
302
|
+
self,
|
|
303
|
+
plotly_name: str,
|
|
304
|
+
**kwargs: Any,
|
|
305
|
+
) -> None: ...
|
|
306
|
+
@property
|
|
307
|
+
def plotly_name(self) -> str: ...
|
|
308
|
+
@property
|
|
309
|
+
def parent(self) -> BasePlotlyType | BaseFigure: ...
|
|
310
|
+
@property
|
|
311
|
+
def figure(self) -> BaseFigure | None: ...
|
|
312
|
+
def __reduce__(self) -> Any: ...
|
|
313
|
+
def __getitem__(self, prop: str) -> Any: ...
|
|
314
|
+
def __contains__(self, prop: str) -> bool: ...
|
|
315
|
+
def __setitem__(self, prop: str, value: Any) -> None: ...
|
|
316
|
+
def __setattr__(self, prop: str, value: Any) -> None: ...
|
|
317
|
+
def __iter__(self) -> Iterator[str]: ...
|
|
318
|
+
def __eq__(self, other: object) -> bool: ...
|
|
319
|
+
def update(
|
|
320
|
+
self,
|
|
321
|
+
dict1: dict[str, Any] = ...,
|
|
322
|
+
overwrite: bool = ...,
|
|
323
|
+
**kwargs: Any,
|
|
324
|
+
) -> BasePlotlyType: # -> Self:
|
|
325
|
+
...
|
|
326
|
+
def pop(self, key: str, dflt: Any) -> Any: ...
|
|
327
|
+
def on_change(
|
|
328
|
+
self,
|
|
329
|
+
callback: Callable[..., None],
|
|
330
|
+
args: list[str | tuple[int | str]],
|
|
331
|
+
append: bool = ...,
|
|
332
|
+
) -> None: ...
|
|
333
|
+
def to_plotly_json(self) -> dict[str, Any]: ...
|
|
334
|
+
def to_json(
|
|
335
|
+
self,
|
|
336
|
+
validate: bool = ...,
|
|
337
|
+
pretty: bool = ...,
|
|
338
|
+
remove_uids: bool = ...,
|
|
339
|
+
engine: str | None = ...,
|
|
340
|
+
) -> str: ...
|
|
341
|
+
|
|
342
|
+
class BaseLayoutHierarchyType(BasePlotlyType):
|
|
343
|
+
def __init__(
|
|
344
|
+
self,
|
|
345
|
+
plotly_name: str,
|
|
346
|
+
**kwargs: Any,
|
|
347
|
+
) -> None: ...
|
|
348
|
+
|
|
349
|
+
class BaseLayoutType(BaseLayoutHierarchyType):
|
|
350
|
+
def __init__(
|
|
351
|
+
self,
|
|
352
|
+
plotly_name: str,
|
|
353
|
+
**kwargs: Any,
|
|
354
|
+
) -> None: ...
|
|
355
|
+
def __getattr__(self, prop: str) -> Any: ...
|
|
356
|
+
def __getitem__(self, prop: str) -> Any: ...
|
|
357
|
+
def __contains__(self, prop: str) -> bool: ...
|
|
358
|
+
def __setitem__(self, prop: str, value: Any) -> None: ...
|
|
359
|
+
def __setattr__(self, prop: str, value: Any) -> None: ...
|
|
360
|
+
def __dir__(self) -> list[str]: ...
|
|
361
|
+
|
|
362
|
+
class BaseTraceHierarchyType(BasePlotlyType):
|
|
363
|
+
def __init__(
|
|
364
|
+
self,
|
|
365
|
+
plotly_name: str,
|
|
366
|
+
**kwargs: Any,
|
|
367
|
+
) -> None: ...
|
|
368
|
+
|
|
369
|
+
class BaseTraceType(BaseTraceHierarchyType):
|
|
370
|
+
def __init__(
|
|
371
|
+
self,
|
|
372
|
+
plotly_name: str,
|
|
373
|
+
**kwargs: Any,
|
|
374
|
+
) -> None: ...
|
|
375
|
+
@property
|
|
376
|
+
def uid(self) -> str | int: ...
|
|
377
|
+
@uid.setter
|
|
378
|
+
def uid(self, val: str | int) -> None: ...
|
|
379
|
+
def on_hover(
|
|
380
|
+
self,
|
|
381
|
+
callback: Callable[[BaseTraceType, Points, InputDeviceState], None],
|
|
382
|
+
append: bool = ...,
|
|
383
|
+
) -> None: ...
|
|
384
|
+
def on_unhover(
|
|
385
|
+
self,
|
|
386
|
+
callback: Callable[[BaseTraceType, Points, InputDeviceState], None],
|
|
387
|
+
append: bool = ...,
|
|
388
|
+
) -> None: ...
|
|
389
|
+
def on_click(
|
|
390
|
+
self,
|
|
391
|
+
callback: Callable[[BaseTraceType, Points, InputDeviceState], None],
|
|
392
|
+
append: bool = ...,
|
|
393
|
+
) -> None: ...
|
|
394
|
+
def on_selection(
|
|
395
|
+
self,
|
|
396
|
+
callback: Callable[[BaseTraceType, Points, BoxSelector | LassoSelector], None],
|
|
397
|
+
append: bool = ...,
|
|
398
|
+
) -> None: ...
|
|
399
|
+
def on_deselect(
|
|
400
|
+
self,
|
|
401
|
+
callback: Callable[[BaseTraceType, Points], None],
|
|
402
|
+
append: bool = ...,
|
|
403
|
+
) -> None: ...
|
|
404
|
+
|
|
405
|
+
class BaseFrameHierarchyType(BasePlotlyType):
|
|
406
|
+
def __init__(
|
|
407
|
+
self,
|
|
408
|
+
plotly_name: str,
|
|
409
|
+
**kwargs: Any,
|
|
410
|
+
) -> None: ...
|
|
411
|
+
def on_change(
|
|
412
|
+
self,
|
|
413
|
+
callback: Callable[..., None],
|
|
414
|
+
args: list[str | tuple[int | str]],
|
|
415
|
+
append: bool = ...,
|
|
416
|
+
) -> None: ...
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
"BoxSelector",
|
|
5
|
+
"InputDeviceState",
|
|
6
|
+
"LassoSelector",
|
|
7
|
+
"Points",
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
class InputDeviceState:
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
ctrl: bool = ...,
|
|
14
|
+
alt: bool = ...,
|
|
15
|
+
shift: bool = ...,
|
|
16
|
+
meta: bool = ...,
|
|
17
|
+
button: int = ...,
|
|
18
|
+
buttons: int = ...,
|
|
19
|
+
**_: Any,
|
|
20
|
+
) -> None: ...
|
|
21
|
+
@property
|
|
22
|
+
def alt(self) -> bool: ...
|
|
23
|
+
@property
|
|
24
|
+
def ctrl(self) -> bool: ...
|
|
25
|
+
@property
|
|
26
|
+
def shift(self) -> bool: ...
|
|
27
|
+
@property
|
|
28
|
+
def meta(self) -> bool: ...
|
|
29
|
+
@property
|
|
30
|
+
def button(self) -> int: ...
|
|
31
|
+
@property
|
|
32
|
+
def buttons(self) -> int: ...
|
|
33
|
+
|
|
34
|
+
class Points:
|
|
35
|
+
def __init__(
|
|
36
|
+
self,
|
|
37
|
+
point_inds: list[int] = ...,
|
|
38
|
+
xs: list[float] = ...,
|
|
39
|
+
ys: list[float] = ...,
|
|
40
|
+
trace_name: str = ...,
|
|
41
|
+
trace_index: int = ...,
|
|
42
|
+
) -> None: ...
|
|
43
|
+
@property
|
|
44
|
+
def point_inds(self) -> list[int]: ...
|
|
45
|
+
@property
|
|
46
|
+
def xs(self) -> list[float]: ...
|
|
47
|
+
@property
|
|
48
|
+
def ys(self) -> list[float]: ...
|
|
49
|
+
@property
|
|
50
|
+
def trace_name(self) -> str: ...
|
|
51
|
+
@property
|
|
52
|
+
def trace_index(self) -> int: ...
|
|
53
|
+
|
|
54
|
+
class BoxSelector:
|
|
55
|
+
def __init__(
|
|
56
|
+
self,
|
|
57
|
+
xrange: tuple[float, float] = ...,
|
|
58
|
+
yrange: tuple[float, float] = ...,
|
|
59
|
+
**_: Any,
|
|
60
|
+
) -> None: ...
|
|
61
|
+
@property
|
|
62
|
+
def type(self) -> str: ...
|
|
63
|
+
@property
|
|
64
|
+
def xrange(self) -> tuple[float, float]: ...
|
|
65
|
+
@property
|
|
66
|
+
def yrange(self) -> tuple[float, float]: ...
|
|
67
|
+
|
|
68
|
+
class LassoSelector:
|
|
69
|
+
def __init__(
|
|
70
|
+
self,
|
|
71
|
+
xs: list[float] = ...,
|
|
72
|
+
ys: list[float] = ...,
|
|
73
|
+
**_: Any,
|
|
74
|
+
) -> None: ...
|
|
75
|
+
@property
|
|
76
|
+
def type(self) -> str: ...
|
|
77
|
+
@property
|
|
78
|
+
def xs(self) -> list[float]: ...
|
|
79
|
+
@property
|
|
80
|
+
def ys(self) -> list[float]: ...
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from _plotly_utils.colors import *
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
"DEFAULT_PLOTLY_COLORS",
|
|
5
|
+
"PLOTLY_SCALES",
|
|
6
|
+
"carto",
|
|
7
|
+
"cmocean",
|
|
8
|
+
"color_parser",
|
|
9
|
+
"colorbrewer",
|
|
10
|
+
"colorscale_to_colors",
|
|
11
|
+
"colorscale_to_scale",
|
|
12
|
+
"convert_colors_to_same_type",
|
|
13
|
+
"convert_colorscale_to_rgb",
|
|
14
|
+
"convert_dict_colors_to_same_type",
|
|
15
|
+
"convert_to_RGB_255",
|
|
16
|
+
"cyclical",
|
|
17
|
+
"diverging",
|
|
18
|
+
"find_intermediate_color",
|
|
19
|
+
"get_colorscale",
|
|
20
|
+
"hex_to_rgb",
|
|
21
|
+
"label_rgb",
|
|
22
|
+
"make_colorscale",
|
|
23
|
+
"n_colors",
|
|
24
|
+
"named_colorscales",
|
|
25
|
+
"plotlyjs",
|
|
26
|
+
"qualitative",
|
|
27
|
+
"sample_colorscale",
|
|
28
|
+
"sequential",
|
|
29
|
+
"unconvert_from_RGB_255",
|
|
30
|
+
"unlabel_rgb",
|
|
31
|
+
"validate_colors",
|
|
32
|
+
"validate_colors_dict",
|
|
33
|
+
"validate_colorscale",
|
|
34
|
+
"validate_scale_values",
|
|
35
|
+
]
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
from plotly.express import colors
|
|
2
|
+
from plotly.express._chart_types import (
|
|
3
|
+
area,
|
|
4
|
+
bar,
|
|
5
|
+
bar_polar,
|
|
6
|
+
box,
|
|
7
|
+
choropleth,
|
|
8
|
+
choropleth_map,
|
|
9
|
+
choropleth_mapbox,
|
|
10
|
+
density_contour,
|
|
11
|
+
density_heatmap,
|
|
12
|
+
density_map,
|
|
13
|
+
density_mapbox,
|
|
14
|
+
ecdf,
|
|
15
|
+
funnel,
|
|
16
|
+
funnel_area,
|
|
17
|
+
histogram,
|
|
18
|
+
icicle,
|
|
19
|
+
line,
|
|
20
|
+
line_3d,
|
|
21
|
+
line_geo,
|
|
22
|
+
line_map,
|
|
23
|
+
line_mapbox,
|
|
24
|
+
line_polar,
|
|
25
|
+
line_ternary,
|
|
26
|
+
parallel_categories,
|
|
27
|
+
parallel_coordinates,
|
|
28
|
+
pie,
|
|
29
|
+
scatter,
|
|
30
|
+
scatter_3d,
|
|
31
|
+
scatter_geo,
|
|
32
|
+
scatter_map,
|
|
33
|
+
scatter_mapbox,
|
|
34
|
+
scatter_matrix,
|
|
35
|
+
scatter_polar,
|
|
36
|
+
scatter_ternary,
|
|
37
|
+
strip,
|
|
38
|
+
sunburst,
|
|
39
|
+
timeline,
|
|
40
|
+
treemap,
|
|
41
|
+
violin,
|
|
42
|
+
)
|
|
43
|
+
from plotly.express._core import NO_COLOR, get_trendline_results, set_mapbox_access_token
|
|
44
|
+
from plotly.express._imshow import imshow
|
|
45
|
+
from plotly.express._special_inputs import Constant, IdentityMap, Range
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"NO_COLOR",
|
|
49
|
+
"Constant",
|
|
50
|
+
"IdentityMap",
|
|
51
|
+
"Range",
|
|
52
|
+
"area",
|
|
53
|
+
"bar",
|
|
54
|
+
"bar_polar",
|
|
55
|
+
"box",
|
|
56
|
+
"choropleth",
|
|
57
|
+
"choropleth_map",
|
|
58
|
+
"choropleth_mapbox",
|
|
59
|
+
"colors",
|
|
60
|
+
"density_contour",
|
|
61
|
+
"density_heatmap",
|
|
62
|
+
"density_map",
|
|
63
|
+
"density_mapbox",
|
|
64
|
+
"ecdf",
|
|
65
|
+
"funnel",
|
|
66
|
+
"funnel_area",
|
|
67
|
+
"get_trendline_results",
|
|
68
|
+
"histogram",
|
|
69
|
+
"icicle",
|
|
70
|
+
"imshow",
|
|
71
|
+
"line",
|
|
72
|
+
"line_3d",
|
|
73
|
+
"line_geo",
|
|
74
|
+
"line_map",
|
|
75
|
+
"line_mapbox",
|
|
76
|
+
"line_polar",
|
|
77
|
+
"line_ternary",
|
|
78
|
+
"parallel_categories",
|
|
79
|
+
"parallel_coordinates",
|
|
80
|
+
"pie",
|
|
81
|
+
"scatter",
|
|
82
|
+
"scatter_3d",
|
|
83
|
+
"scatter_geo",
|
|
84
|
+
"scatter_map",
|
|
85
|
+
"scatter_mapbox",
|
|
86
|
+
"scatter_matrix",
|
|
87
|
+
"scatter_polar",
|
|
88
|
+
"scatter_ternary",
|
|
89
|
+
"set_mapbox_access_token",
|
|
90
|
+
"strip",
|
|
91
|
+
"sunburst",
|
|
92
|
+
"timeline",
|
|
93
|
+
"treemap",
|
|
94
|
+
"violin",
|
|
95
|
+
]
|