MatplotLibAPI 3.2.12__py3-none-any.whl → 3.2.14__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.
- MatplotLibAPI/Bubble.py +419 -131
- MatplotLibAPI/Composite.py +138 -139
- MatplotLibAPI/Network.py +755 -339
- MatplotLibAPI/Pivot.py +115 -196
- MatplotLibAPI/StyleTemplate.py +238 -300
- MatplotLibAPI/Table.py +185 -56
- MatplotLibAPI/Timeserie.py +292 -78
- MatplotLibAPI/Treemap.py +133 -75
- MatplotLibAPI/Wordcloud.py +314 -0
- MatplotLibAPI/__init__.py +838 -313
- {MatplotLibAPI-3.2.12.dist-info → matplotlibapi-3.2.14.dist-info}/METADATA +17 -9
- matplotlibapi-3.2.14.dist-info/RECORD +14 -0
- {MatplotLibAPI-3.2.12.dist-info → matplotlibapi-3.2.14.dist-info}/WHEEL +1 -2
- MatplotLibAPI-3.2.12.dist-info/RECORD +0 -14
- MatplotLibAPI-3.2.12.dist-info/top_level.txt +0 -1
- {MatplotLibAPI-3.2.12.dist-info → matplotlibapi-3.2.14.dist-info/licenses}/LICENSE +0 -0
MatplotLibAPI/__init__.py
CHANGED
|
@@ -1,325 +1,850 @@
|
|
|
1
|
+
"""Public API and pandas accessor for MatplotLibAPI."""
|
|
1
2
|
|
|
2
|
-
from
|
|
3
|
-
from .Bubble import aplot_bubble, fplot_bubble, BUBBLE_STYLE_TEMPLATE
|
|
4
|
-
from .Composite import plot_composite_bubble,plot_composite_treemap
|
|
5
|
-
from .Timeserie import aplot_timeserie, fplot_timeserie, TIMESERIE_STYLE_TEMPLATE
|
|
6
|
-
from .Table import aplot_table, fplot_table, TABLE_STYLE_TEMPLATE
|
|
7
|
-
from .Network import aplot_network, aplot_network_components, fplot_network, NETWORK_STYLE_TEMPLATE
|
|
8
|
-
from .Treemap import fplot_treemap, aplot_treemap, TREEMAP_STYLE_TEMPLATE
|
|
9
|
-
from typing import List, Optional, Tuple,Dict
|
|
10
|
-
import pandas as pd
|
|
11
|
-
from pandas.api.extensions import register_dataframe_accessor
|
|
3
|
+
from typing import Dict, List, Optional, Tuple
|
|
12
4
|
|
|
5
|
+
import numpy as np
|
|
6
|
+
import pandas as pd
|
|
7
|
+
import plotly.graph_objects as go
|
|
13
8
|
from matplotlib.axes import Axes
|
|
14
9
|
from matplotlib.figure import Figure
|
|
15
|
-
|
|
10
|
+
from pandas.api.extensions import register_dataframe_accessor
|
|
11
|
+
|
|
12
|
+
from .Bubble import BUBBLE_STYLE_TEMPLATE, aplot_bubble, fplot_bubble
|
|
13
|
+
from .Composite import plot_composite_bubble, plot_composite_treemap
|
|
14
|
+
from .Network import (
|
|
15
|
+
NETWORK_STYLE_TEMPLATE,
|
|
16
|
+
aplot_network,
|
|
17
|
+
aplot_network_components,
|
|
18
|
+
fplot_network,
|
|
19
|
+
)
|
|
20
|
+
from .StyleTemplate import StyleTemplate
|
|
21
|
+
from .Table import TABLE_STYLE_TEMPLATE, aplot_table, fplot_table
|
|
22
|
+
from .Timeserie import TIMESERIE_STYLE_TEMPLATE, aplot_timeserie, fplot_timeserie
|
|
23
|
+
from .Treemap import TREEMAP_STYLE_TEMPLATE, aplot_treemap, fplot_treemap
|
|
24
|
+
from .Wordcloud import WORDCLOUD_STYLE_TEMPLATE, aplot_wordcloud, fplot_wordcloud
|
|
16
25
|
|
|
17
26
|
|
|
18
27
|
@register_dataframe_accessor("mpl")
|
|
19
28
|
class DataFrameAccessor:
|
|
29
|
+
"""Expose MatplotLibAPI plotting helpers as a pandas accessor.
|
|
30
|
+
|
|
31
|
+
Methods
|
|
32
|
+
-------
|
|
33
|
+
aplot_bubble
|
|
34
|
+
Plot a bubble chart using the underlying DataFrame.
|
|
35
|
+
fplot_bubble
|
|
36
|
+
Plot a bubble chart on a new figure.
|
|
37
|
+
fplot_composite_bubble
|
|
38
|
+
Plot a composite bubble chart with summary tables.
|
|
39
|
+
aplot_table
|
|
40
|
+
Plot a table of the DataFrame's data on a Matplotlib axes.
|
|
41
|
+
fplot_table
|
|
42
|
+
Plot a table of the DataFrame's data on a new figure.
|
|
43
|
+
aplot_timeserie
|
|
44
|
+
Plot a time series on a Matplotlib axes.
|
|
45
|
+
fplot_timeserie
|
|
46
|
+
Plot a time series on a new figure.
|
|
47
|
+
aplot_wordcloud
|
|
48
|
+
Plot a word cloud on a Matplotlib axes.
|
|
49
|
+
fplot_wordcloud
|
|
50
|
+
Plot a word cloud on a new figure.
|
|
51
|
+
aplot_network
|
|
52
|
+
Plot a network graph on a Matplotlib axes.
|
|
53
|
+
aplot_network_components
|
|
54
|
+
Plot connected components of a network graph on multiple axes.
|
|
55
|
+
fplot_network
|
|
56
|
+
Plot a network graph on a new figure.
|
|
57
|
+
fplot_treemap
|
|
58
|
+
Plot a treemap on a new Plotly figure.
|
|
59
|
+
fplot_composite_treemap
|
|
60
|
+
Plot a composite treemap on a new Plotly figure.
|
|
61
|
+
"""
|
|
20
62
|
|
|
21
63
|
def __init__(self, pd_df: pd.DataFrame):
|
|
64
|
+
"""Store the parent DataFrame."""
|
|
22
65
|
self._obj = pd_df
|
|
23
66
|
|
|
24
|
-
def aplot_bubble(
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
67
|
+
def aplot_bubble(
|
|
68
|
+
self,
|
|
69
|
+
label: str,
|
|
70
|
+
x: str,
|
|
71
|
+
y: str,
|
|
72
|
+
z: str,
|
|
73
|
+
title: Optional[str] = None,
|
|
74
|
+
style: StyleTemplate = BUBBLE_STYLE_TEMPLATE,
|
|
75
|
+
max_values: int = 50,
|
|
76
|
+
center_to_mean: bool = False,
|
|
77
|
+
sort_by: Optional[str] = None,
|
|
78
|
+
ascending: bool = False,
|
|
79
|
+
hline: bool = False,
|
|
80
|
+
vline: bool = False,
|
|
81
|
+
ax: Optional[Axes] = None,
|
|
82
|
+
) -> Axes:
|
|
83
|
+
"""Plot a bubble chart using the underlying DataFrame.
|
|
84
|
+
|
|
85
|
+
Parameters
|
|
86
|
+
----------
|
|
87
|
+
label : str
|
|
88
|
+
Column to use for bubble labels.
|
|
89
|
+
x : str
|
|
90
|
+
Column to use for the x-axis.
|
|
91
|
+
y : str
|
|
92
|
+
Column to use for the y-axis.
|
|
93
|
+
z : str
|
|
94
|
+
Column to use for the bubble size.
|
|
95
|
+
title : str, optional
|
|
96
|
+
Chart title.
|
|
97
|
+
style : StyleTemplate, optional
|
|
98
|
+
Styling template. The default is `BUBBLE_STYLE_TEMPLATE`.
|
|
99
|
+
max_values : int, optional
|
|
100
|
+
Maximum number of bubbles to plot. The default is 50.
|
|
101
|
+
center_to_mean : bool, optional
|
|
102
|
+
If True, center x-axis values around the mean. The default is `False`.
|
|
103
|
+
sort_by : str, optional
|
|
104
|
+
Column to sort by before plotting.
|
|
105
|
+
ascending : bool, optional
|
|
106
|
+
Sort order. The default is `False`.
|
|
107
|
+
hline : bool, optional
|
|
108
|
+
If True, draw a horizontal line at the mean of y-values. The default is `False`.
|
|
109
|
+
vline : bool, optional
|
|
110
|
+
If True, draw a vertical line at the mean of x-values. The default is `False`.
|
|
111
|
+
ax : Axes, optional
|
|
112
|
+
Matplotlib axes to plot on. If None, uses the current axes.
|
|
113
|
+
|
|
114
|
+
Returns
|
|
115
|
+
-------
|
|
116
|
+
Axes
|
|
117
|
+
The Matplotlib axes object with the plot.
|
|
118
|
+
"""
|
|
119
|
+
return aplot_bubble(
|
|
120
|
+
pd_df=self._obj,
|
|
121
|
+
label=label,
|
|
122
|
+
x=x,
|
|
123
|
+
y=y,
|
|
124
|
+
z=z,
|
|
125
|
+
title=title,
|
|
126
|
+
style=style,
|
|
127
|
+
max_values=max_values,
|
|
128
|
+
center_to_mean=center_to_mean,
|
|
129
|
+
sort_by=sort_by,
|
|
130
|
+
ascending=ascending,
|
|
131
|
+
hline=hline,
|
|
132
|
+
vline=vline,
|
|
133
|
+
ax=ax,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def fplot_bubble(
|
|
137
|
+
self,
|
|
138
|
+
label: str,
|
|
139
|
+
x: str,
|
|
140
|
+
y: str,
|
|
141
|
+
z: str,
|
|
142
|
+
title: Optional[str] = None,
|
|
143
|
+
style: StyleTemplate = BUBBLE_STYLE_TEMPLATE,
|
|
144
|
+
max_values: int = 50,
|
|
145
|
+
center_to_mean: bool = False,
|
|
146
|
+
sort_by: Optional[str] = None,
|
|
147
|
+
ascending: bool = False,
|
|
148
|
+
hline: bool = False,
|
|
149
|
+
vline: bool = False,
|
|
150
|
+
figsize: Tuple[float, float] = (19.2, 10.8),
|
|
151
|
+
) -> Figure:
|
|
152
|
+
"""Plot a bubble chart on a new figure.
|
|
153
|
+
|
|
154
|
+
Parameters
|
|
155
|
+
----------
|
|
156
|
+
label : str
|
|
157
|
+
Column to use for bubble labels.
|
|
158
|
+
x : str
|
|
159
|
+
Column to use for the x-axis.
|
|
160
|
+
y : str
|
|
161
|
+
Column to use for the y-axis.
|
|
162
|
+
z : str
|
|
163
|
+
Column to use for the bubble size.
|
|
164
|
+
title : str, optional
|
|
165
|
+
Chart title.
|
|
166
|
+
style : StyleTemplate, optional
|
|
167
|
+
Styling template. The default is `BUBBLE_STYLE_TEMPLATE`.
|
|
168
|
+
max_values : int, optional
|
|
169
|
+
Maximum number of bubbles to plot. The default is 50.
|
|
170
|
+
center_to_mean : bool, optional
|
|
171
|
+
If True, center x-axis values around the mean. The default is `False`.
|
|
172
|
+
sort_by : str, optional
|
|
173
|
+
Column to sort by before plotting.
|
|
174
|
+
ascending : bool, optional
|
|
175
|
+
Sort order. The default is `False`.
|
|
176
|
+
hline : bool, optional
|
|
177
|
+
If True, draw a horizontal line at the mean of y-values. The default is `False`.
|
|
178
|
+
vline : bool, optional
|
|
179
|
+
If True, draw a vertical line at the mean of x-values. The default is `False`.
|
|
180
|
+
figsize : tuple[float, float], optional
|
|
181
|
+
Figure size. The default is (19.2, 10.8).
|
|
182
|
+
|
|
183
|
+
Returns
|
|
184
|
+
-------
|
|
185
|
+
Figure
|
|
186
|
+
The new Matplotlib figure with the plot.
|
|
187
|
+
"""
|
|
188
|
+
return fplot_bubble(
|
|
189
|
+
pd_df=self._obj,
|
|
190
|
+
label=label,
|
|
191
|
+
x=x,
|
|
192
|
+
y=y,
|
|
193
|
+
z=z,
|
|
194
|
+
title=title,
|
|
195
|
+
style=style,
|
|
196
|
+
max_values=max_values,
|
|
197
|
+
center_to_mean=center_to_mean,
|
|
198
|
+
sort_by=sort_by,
|
|
199
|
+
ascending=ascending,
|
|
200
|
+
hline=hline,
|
|
201
|
+
vline=vline,
|
|
202
|
+
figsize=figsize,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
def fplot_composite_bubble(
|
|
206
|
+
self,
|
|
207
|
+
label: str,
|
|
208
|
+
x: str,
|
|
209
|
+
y: str,
|
|
210
|
+
z: str,
|
|
211
|
+
title: Optional[str] = None,
|
|
212
|
+
style: StyleTemplate = BUBBLE_STYLE_TEMPLATE,
|
|
213
|
+
max_values: int = 100,
|
|
214
|
+
center_to_mean: bool = False,
|
|
215
|
+
sort_by: Optional[str] = None,
|
|
216
|
+
ascending: bool = False,
|
|
217
|
+
table_rows: int = 10,
|
|
218
|
+
) -> Figure:
|
|
219
|
+
"""Plot a composite bubble chart with summary tables.
|
|
220
|
+
|
|
221
|
+
This plot combines a bubble chart with tables summarizing the
|
|
222
|
+
top and bottom rows of the dataset.
|
|
223
|
+
|
|
224
|
+
Parameters
|
|
225
|
+
----------
|
|
226
|
+
label : str
|
|
227
|
+
Column to use for bubble labels.
|
|
228
|
+
x : str
|
|
229
|
+
Column to use for the x-axis.
|
|
230
|
+
y : str
|
|
231
|
+
Column to use for the y-axis.
|
|
232
|
+
z : str
|
|
233
|
+
Column to use for the bubble size.
|
|
234
|
+
title : str, optional
|
|
235
|
+
Chart title.
|
|
236
|
+
style : StyleTemplate, optional
|
|
237
|
+
Styling template. The default is `BUBBLE_STYLE_TEMPLATE`.
|
|
238
|
+
max_values : int, optional
|
|
239
|
+
Maximum number of bubbles to plot. The default is 100.
|
|
240
|
+
center_to_mean : bool, optional
|
|
241
|
+
If True, center x-axis values around the mean. The default is `False`.
|
|
242
|
+
sort_by : str, optional
|
|
243
|
+
Column to sort by before plotting.
|
|
244
|
+
ascending : bool, optional
|
|
245
|
+
Sort order. The default is `False`.
|
|
246
|
+
table_rows : int, optional
|
|
247
|
+
Number of rows for the summary tables. The default is 10.
|
|
248
|
+
|
|
249
|
+
Returns
|
|
250
|
+
-------
|
|
251
|
+
Figure
|
|
252
|
+
The new Matplotlib figure with the composite plot.
|
|
253
|
+
"""
|
|
254
|
+
return plot_composite_bubble(
|
|
255
|
+
pd_df=self._obj,
|
|
256
|
+
label=label,
|
|
257
|
+
x=x,
|
|
258
|
+
y=y,
|
|
259
|
+
z=z,
|
|
260
|
+
title=title,
|
|
261
|
+
style=style,
|
|
262
|
+
max_values=max_values,
|
|
263
|
+
center_to_mean=center_to_mean,
|
|
264
|
+
sort_by=sort_by,
|
|
265
|
+
ascending=ascending,
|
|
266
|
+
table_rows=table_rows,
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
def aplot_table(
|
|
270
|
+
self,
|
|
271
|
+
cols: List[str],
|
|
272
|
+
title: Optional[str] = None,
|
|
273
|
+
style: StyleTemplate = TABLE_STYLE_TEMPLATE,
|
|
274
|
+
max_values: int = 20,
|
|
275
|
+
sort_by: Optional[str] = None,
|
|
276
|
+
ascending: bool = False,
|
|
277
|
+
ax: Optional[Axes] = None,
|
|
278
|
+
) -> Axes:
|
|
279
|
+
"""Plot a table of the DataFrame's data on a Matplotlib axes.
|
|
280
|
+
|
|
281
|
+
Parameters
|
|
282
|
+
----------
|
|
283
|
+
cols : list[str]
|
|
284
|
+
List of columns to include in the table.
|
|
285
|
+
title : str, optional
|
|
286
|
+
Table title.
|
|
287
|
+
style : StyleTemplate, optional
|
|
288
|
+
Styling template. The default is `TABLE_STYLE_TEMPLATE`.
|
|
289
|
+
max_values : int, optional
|
|
290
|
+
Maximum number of rows to display. The default is 20.
|
|
291
|
+
sort_by : str, optional
|
|
292
|
+
Column to sort by.
|
|
293
|
+
ascending : bool, optional
|
|
294
|
+
Sort order. The default is `False`.
|
|
295
|
+
ax : Axes, optional
|
|
296
|
+
Matplotlib axes to plot on. If None, uses the current axes.
|
|
297
|
+
|
|
298
|
+
Returns
|
|
299
|
+
-------
|
|
300
|
+
Axes
|
|
301
|
+
The Matplotlib axes object with the table.
|
|
302
|
+
"""
|
|
303
|
+
return aplot_table(
|
|
304
|
+
pd_df=self._obj,
|
|
305
|
+
cols=cols,
|
|
306
|
+
title=title,
|
|
307
|
+
style=style,
|
|
308
|
+
max_values=max_values,
|
|
309
|
+
sort_by=sort_by,
|
|
310
|
+
ascending=ascending,
|
|
311
|
+
ax=ax,
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
def fplot_table(
|
|
315
|
+
self,
|
|
316
|
+
cols: List[str],
|
|
317
|
+
title: Optional[str] = None,
|
|
318
|
+
style: StyleTemplate = TABLE_STYLE_TEMPLATE,
|
|
319
|
+
max_values: int = 20,
|
|
320
|
+
sort_by: Optional[str] = None,
|
|
321
|
+
ascending: bool = False,
|
|
322
|
+
figsize: Tuple[float, float] = (19.2, 10.8),
|
|
323
|
+
) -> Figure:
|
|
324
|
+
"""Plot a table of the DataFrame's data on a new figure.
|
|
325
|
+
|
|
326
|
+
Parameters
|
|
327
|
+
----------
|
|
328
|
+
cols : list[str]
|
|
329
|
+
List of columns to include in the table.
|
|
330
|
+
title : str, optional
|
|
331
|
+
Table title.
|
|
332
|
+
style : StyleTemplate, optional
|
|
333
|
+
Styling template. The default is `TABLE_STYLE_TEMPLATE`.
|
|
334
|
+
max_values : int, optional
|
|
335
|
+
Maximum number of rows to display. The default is 20.
|
|
336
|
+
sort_by : str, optional
|
|
337
|
+
Column to sort by.
|
|
338
|
+
ascending : bool, optional
|
|
339
|
+
Sort order. The default is `False`.
|
|
340
|
+
figsize : tuple[float, float], optional
|
|
341
|
+
Figure size. The default is (19.2, 10.8).
|
|
342
|
+
|
|
343
|
+
Returns
|
|
344
|
+
-------
|
|
345
|
+
Figure
|
|
346
|
+
The new Matplotlib figure with the table.
|
|
347
|
+
"""
|
|
348
|
+
return fplot_table(
|
|
349
|
+
pd_df=self._obj,
|
|
350
|
+
cols=cols,
|
|
351
|
+
title=title,
|
|
352
|
+
style=style,
|
|
353
|
+
max_values=max_values,
|
|
354
|
+
sort_by=sort_by,
|
|
355
|
+
ascending=ascending,
|
|
356
|
+
figsize=figsize,
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
def aplot_timeserie(
|
|
360
|
+
self,
|
|
361
|
+
label: str,
|
|
362
|
+
x: str,
|
|
363
|
+
y: str,
|
|
364
|
+
title: Optional[str] = None,
|
|
365
|
+
style: StyleTemplate = TIMESERIE_STYLE_TEMPLATE,
|
|
366
|
+
max_values: int = 100,
|
|
367
|
+
sort_by: Optional[str] = None,
|
|
368
|
+
ascending: bool = False,
|
|
369
|
+
std: bool = False,
|
|
370
|
+
ax: Optional[Axes] = None,
|
|
371
|
+
) -> Axes:
|
|
372
|
+
"""Plot a time series on a Matplotlib axes.
|
|
373
|
+
|
|
374
|
+
Parameters
|
|
375
|
+
----------
|
|
376
|
+
label : str
|
|
377
|
+
Column to use for the series label.
|
|
378
|
+
x : str
|
|
379
|
+
Column to use for the x-axis (time).
|
|
380
|
+
y : str
|
|
381
|
+
Column to use for the y-axis (values).
|
|
382
|
+
title : str, optional
|
|
383
|
+
Chart title.
|
|
384
|
+
style : StyleTemplate, optional
|
|
385
|
+
Styling template. The default is `TIMESERIE_STYLE_TEMPLATE`.
|
|
386
|
+
max_values : int, optional
|
|
387
|
+
Maximum number of data points to plot. The default is 100.
|
|
388
|
+
sort_by : str, optional
|
|
389
|
+
Column to sort by.
|
|
390
|
+
ascending : bool, optional
|
|
391
|
+
Sort order. The default is `False`.
|
|
392
|
+
std : bool, optional
|
|
393
|
+
If True, plot the standard deviation. The default is `False`.
|
|
394
|
+
ax : Axes, optional
|
|
395
|
+
Matplotlib axes to plot on. If None, uses the current axes.
|
|
396
|
+
|
|
397
|
+
Returns
|
|
398
|
+
-------
|
|
399
|
+
Axes
|
|
400
|
+
The Matplotlib axes object with the plot.
|
|
401
|
+
"""
|
|
402
|
+
return aplot_timeserie(
|
|
403
|
+
pd_df=self._obj,
|
|
404
|
+
label=label,
|
|
405
|
+
x=x,
|
|
406
|
+
y=y,
|
|
407
|
+
title=title,
|
|
408
|
+
style=style,
|
|
409
|
+
max_values=max_values,
|
|
410
|
+
sort_by=sort_by,
|
|
411
|
+
ascending=ascending,
|
|
412
|
+
std=std,
|
|
413
|
+
ax=ax,
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
def fplot_timeserie(
|
|
417
|
+
self,
|
|
418
|
+
label: str,
|
|
419
|
+
x: str,
|
|
420
|
+
y: str,
|
|
421
|
+
title: Optional[str] = None,
|
|
422
|
+
style: StyleTemplate = TIMESERIE_STYLE_TEMPLATE,
|
|
423
|
+
max_values: int = 100,
|
|
424
|
+
sort_by: Optional[str] = None,
|
|
425
|
+
ascending: bool = False,
|
|
426
|
+
std: bool = False,
|
|
427
|
+
figsize: Tuple[float, float] = (19.2, 10.8),
|
|
428
|
+
) -> Figure:
|
|
429
|
+
"""Plot a time series on a new figure.
|
|
430
|
+
|
|
431
|
+
Parameters
|
|
432
|
+
----------
|
|
433
|
+
label : str
|
|
434
|
+
Column to use for the series label.
|
|
435
|
+
x : str
|
|
436
|
+
Column to use for the x-axis (time).
|
|
437
|
+
y : str
|
|
438
|
+
Column to use for the y-axis (values).
|
|
439
|
+
title : str, optional
|
|
440
|
+
Chart title.
|
|
441
|
+
style : StyleTemplate, optional
|
|
442
|
+
Styling template. The default is `TIMESERIE_STYLE_TEMPLATE`.
|
|
443
|
+
max_values : int, optional
|
|
444
|
+
Maximum number of data points to plot. The default is 100.
|
|
445
|
+
sort_by : str, optional
|
|
446
|
+
Column to sort by.
|
|
447
|
+
ascending : bool, optional
|
|
448
|
+
Sort order. The default is `False`.
|
|
449
|
+
std : bool, optional
|
|
450
|
+
If True, plot the standard deviation. The default is `False`.
|
|
451
|
+
figsize : tuple[float, float], optional
|
|
452
|
+
Figure size. The default is (19.2, 10.8).
|
|
453
|
+
|
|
454
|
+
Returns
|
|
455
|
+
-------
|
|
456
|
+
Figure
|
|
457
|
+
The new Matplotlib figure with the plot.
|
|
458
|
+
"""
|
|
459
|
+
return fplot_timeserie(
|
|
460
|
+
pd_df=self._obj,
|
|
461
|
+
label=label,
|
|
462
|
+
x=x,
|
|
463
|
+
y=y,
|
|
464
|
+
title=title,
|
|
465
|
+
style=style,
|
|
466
|
+
max_values=max_values,
|
|
467
|
+
sort_by=sort_by,
|
|
468
|
+
ascending=ascending,
|
|
469
|
+
std=std,
|
|
470
|
+
figsize=figsize,
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
def aplot_wordcloud(
|
|
474
|
+
self,
|
|
475
|
+
text_column: str,
|
|
476
|
+
weight_column: Optional[str] = None,
|
|
477
|
+
title: Optional[str] = None,
|
|
478
|
+
style: StyleTemplate = WORDCLOUD_STYLE_TEMPLATE,
|
|
479
|
+
max_words: int = 50,
|
|
480
|
+
stopwords: Optional[List[str]] = None,
|
|
481
|
+
random_state: Optional[int] = None,
|
|
482
|
+
ax: Optional[Axes] = None,
|
|
483
|
+
) -> Axes:
|
|
484
|
+
"""Plot a word cloud on a Matplotlib axes.
|
|
485
|
+
|
|
486
|
+
Parameters
|
|
487
|
+
----------
|
|
488
|
+
text_column : str
|
|
489
|
+
Column containing words or phrases.
|
|
490
|
+
weight_column : str, optional
|
|
491
|
+
Column containing numeric weights. The default is ``None`` for equal weights.
|
|
492
|
+
title : str, optional
|
|
493
|
+
Chart title.
|
|
494
|
+
style : StyleTemplate, optional
|
|
495
|
+
Styling template. The default is `WORDCLOUD_STYLE_TEMPLATE`.
|
|
496
|
+
max_words : int, optional
|
|
497
|
+
Maximum number of words to display. The default is 50.
|
|
498
|
+
stopwords : list[str], optional
|
|
499
|
+
Words to exclude from the visualization. The default is ``None``.
|
|
500
|
+
random_state : int, optional
|
|
501
|
+
Seed for word placement. The default is ``None``.
|
|
502
|
+
ax : Axes, optional
|
|
503
|
+
Matplotlib axes to plot on. If None, uses the current axes.
|
|
504
|
+
|
|
505
|
+
Returns
|
|
506
|
+
-------
|
|
507
|
+
Axes
|
|
508
|
+
The Matplotlib axes object with the plot.
|
|
509
|
+
"""
|
|
510
|
+
return aplot_wordcloud(
|
|
511
|
+
pd_df=self._obj,
|
|
512
|
+
text_column=text_column,
|
|
513
|
+
weight_column=weight_column,
|
|
514
|
+
title=title,
|
|
515
|
+
style=style,
|
|
516
|
+
max_words=max_words,
|
|
517
|
+
stopwords=stopwords,
|
|
518
|
+
random_state=random_state,
|
|
519
|
+
ax=ax,
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
def fplot_wordcloud(
|
|
523
|
+
self,
|
|
524
|
+
text_column: str,
|
|
525
|
+
weight_column: Optional[str] = None,
|
|
526
|
+
title: Optional[str] = None,
|
|
527
|
+
style: StyleTemplate = WORDCLOUD_STYLE_TEMPLATE,
|
|
528
|
+
max_words: int = 50,
|
|
529
|
+
stopwords: Optional[List[str]] = None,
|
|
530
|
+
random_state: Optional[int] = None,
|
|
531
|
+
figsize: Tuple[float, float] = (19.2, 10.8),
|
|
532
|
+
) -> Figure:
|
|
533
|
+
"""Plot a word cloud on a new figure.
|
|
534
|
+
|
|
535
|
+
Parameters
|
|
536
|
+
----------
|
|
537
|
+
text_column : str
|
|
538
|
+
Column containing words or phrases.
|
|
539
|
+
weight_column : str, optional
|
|
540
|
+
Column containing numeric weights. The default is ``None`` for equal weights.
|
|
541
|
+
title : str, optional
|
|
542
|
+
Chart title.
|
|
543
|
+
style : StyleTemplate, optional
|
|
544
|
+
Styling template. The default is `WORDCLOUD_STYLE_TEMPLATE`.
|
|
545
|
+
max_words : int, optional
|
|
546
|
+
Maximum number of words to display. The default is 50.
|
|
547
|
+
stopwords : list[str], optional
|
|
548
|
+
Words to exclude from the visualization. The default is ``None``.
|
|
549
|
+
random_state : int, optional
|
|
550
|
+
Seed for word placement. The default is ``None``.
|
|
551
|
+
figsize : tuple[float, float], optional
|
|
552
|
+
Figure size. The default is (19.2, 10.8).
|
|
553
|
+
|
|
554
|
+
Returns
|
|
555
|
+
-------
|
|
556
|
+
Figure
|
|
557
|
+
The new Matplotlib figure with the plot.
|
|
558
|
+
"""
|
|
559
|
+
return fplot_wordcloud(
|
|
560
|
+
pd_df=self._obj,
|
|
561
|
+
text_column=text_column,
|
|
562
|
+
weight_column=weight_column,
|
|
563
|
+
title=title,
|
|
564
|
+
style=style,
|
|
565
|
+
max_words=max_words,
|
|
566
|
+
stopwords=stopwords,
|
|
567
|
+
random_state=random_state,
|
|
568
|
+
figsize=figsize,
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
def aplot_network(
|
|
572
|
+
self,
|
|
573
|
+
source: str = "source",
|
|
574
|
+
target: str = "target",
|
|
575
|
+
weight: str = "weight",
|
|
576
|
+
title: Optional[str] = None,
|
|
577
|
+
style: StyleTemplate = NETWORK_STYLE_TEMPLATE,
|
|
578
|
+
sort_by: Optional[str] = None,
|
|
579
|
+
ascending: bool = False,
|
|
580
|
+
node_list: Optional[List] = None,
|
|
581
|
+
ax: Optional[Axes] = None,
|
|
582
|
+
) -> Axes:
|
|
583
|
+
"""Plot a network graph on a Matplotlib axes.
|
|
584
|
+
|
|
585
|
+
Parameters
|
|
586
|
+
----------
|
|
587
|
+
source : str, optional
|
|
588
|
+
Column for source nodes. The default is "source".
|
|
589
|
+
target : str, optional
|
|
590
|
+
Column for target nodes. The default is "target".
|
|
591
|
+
weight : str, optional
|
|
592
|
+
Column for edge weights. The default is "weight".
|
|
593
|
+
title : str, optional
|
|
594
|
+
Chart title.
|
|
595
|
+
style : StyleTemplate, optional
|
|
596
|
+
Styling template. The default is `NETWORK_STYLE_TEMPLATE`.
|
|
597
|
+
sort_by : str, optional
|
|
598
|
+
Column to sort by.
|
|
599
|
+
ascending : bool, optional
|
|
600
|
+
Sort order. The default is `False`.
|
|
601
|
+
node_list : list, optional
|
|
602
|
+
List of nodes to include. If None, all nodes are used.
|
|
603
|
+
ax : Axes, optional
|
|
604
|
+
Matplotlib axes to plot on. If None, uses the current axes.
|
|
605
|
+
|
|
606
|
+
Returns
|
|
607
|
+
-------
|
|
608
|
+
Axes
|
|
609
|
+
The Matplotlib axes object with the plot.
|
|
610
|
+
"""
|
|
611
|
+
return aplot_network(
|
|
612
|
+
pd_df=self._obj,
|
|
613
|
+
source=source,
|
|
614
|
+
target=target,
|
|
615
|
+
weight=weight,
|
|
616
|
+
title=title,
|
|
617
|
+
style=style,
|
|
618
|
+
sort_by=sort_by,
|
|
619
|
+
ascending=ascending,
|
|
620
|
+
node_list=node_list,
|
|
621
|
+
ax=ax,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
def aplot_network_components(
|
|
625
|
+
self,
|
|
626
|
+
source: str = "source",
|
|
627
|
+
target: str = "target",
|
|
628
|
+
weight: str = "weight",
|
|
629
|
+
title: Optional[str] = None,
|
|
630
|
+
style: StyleTemplate = NETWORK_STYLE_TEMPLATE,
|
|
631
|
+
sort_by: Optional[str] = None,
|
|
632
|
+
ascending: bool = False,
|
|
633
|
+
node_list: Optional[List] = None,
|
|
634
|
+
axes: Optional[np.ndarray] = None,
|
|
635
|
+
) -> None:
|
|
636
|
+
"""Plot connected components of a network graph on multiple axes.
|
|
637
|
+
|
|
638
|
+
Parameters
|
|
639
|
+
----------
|
|
640
|
+
source : str, optional
|
|
641
|
+
Column for source nodes. The default is "source".
|
|
642
|
+
target : str, optional
|
|
643
|
+
Column for target nodes. The default is "target".
|
|
644
|
+
weight : str, optional
|
|
645
|
+
Column for edge weights. The default is "weight".
|
|
646
|
+
title : str, optional
|
|
647
|
+
Chart title.
|
|
648
|
+
style : StyleTemplate, optional
|
|
649
|
+
Styling template. The default is `NETWORK_STYLE_TEMPLATE`.
|
|
650
|
+
sort_by : str, optional
|
|
651
|
+
Column to sort by.
|
|
652
|
+
ascending : bool, optional
|
|
653
|
+
Sort order. The default is `False`.
|
|
654
|
+
node_list : list, optional
|
|
655
|
+
List of nodes to include. If None, all nodes are used.
|
|
656
|
+
axes : np.ndarray, optional
|
|
657
|
+
Numpy array of Matplotlib axes to plot on. If None, new axes are created.
|
|
658
|
+
"""
|
|
659
|
+
aplot_network_components(
|
|
660
|
+
pd_df=self._obj,
|
|
661
|
+
source=source,
|
|
662
|
+
target=target,
|
|
663
|
+
weight=weight,
|
|
664
|
+
title=title,
|
|
665
|
+
style=style,
|
|
666
|
+
sort_by=sort_by,
|
|
667
|
+
ascending=ascending,
|
|
668
|
+
node_list=node_list,
|
|
669
|
+
axes=axes,
|
|
670
|
+
)
|
|
671
|
+
|
|
672
|
+
def fplot_network(
|
|
673
|
+
self,
|
|
674
|
+
source: str = "source",
|
|
675
|
+
target: str = "target",
|
|
676
|
+
weight: str = "weight",
|
|
677
|
+
title: Optional[str] = None,
|
|
678
|
+
style: StyleTemplate = NETWORK_STYLE_TEMPLATE,
|
|
679
|
+
sort_by: Optional[str] = None,
|
|
680
|
+
ascending: bool = False,
|
|
681
|
+
node_list: Optional[List] = None,
|
|
682
|
+
figsize: Tuple[float, float] = (19.2, 10.8),
|
|
683
|
+
) -> Figure:
|
|
684
|
+
"""Plot a network graph on a new figure.
|
|
685
|
+
|
|
686
|
+
Parameters
|
|
687
|
+
----------
|
|
688
|
+
source : str, optional
|
|
689
|
+
Column for source nodes. The default is "source".
|
|
690
|
+
target : str, optional
|
|
691
|
+
Column for target nodes. The default is "target".
|
|
692
|
+
weight : str, optional
|
|
693
|
+
Column for edge weights. The default is "weight".
|
|
694
|
+
title : str, optional
|
|
695
|
+
Chart title.
|
|
696
|
+
style : StyleTemplate, optional
|
|
697
|
+
Styling template. The default is `NETWORK_STYLE_TEMPLATE`.
|
|
698
|
+
sort_by : str, optional
|
|
699
|
+
Column to sort by.
|
|
700
|
+
ascending : bool, optional
|
|
701
|
+
Sort order. The default is `False`.
|
|
702
|
+
node_list : list, optional
|
|
703
|
+
List of nodes to include. If None, all nodes are used.
|
|
704
|
+
figsize : tuple[float, float], optional
|
|
705
|
+
Figure size. The default is (19.2, 10.8).
|
|
706
|
+
|
|
707
|
+
Returns
|
|
708
|
+
-------
|
|
709
|
+
Figure
|
|
710
|
+
The new Matplotlib figure with the plot.
|
|
711
|
+
"""
|
|
712
|
+
return fplot_network(
|
|
713
|
+
pd_df=self._obj,
|
|
714
|
+
source=source,
|
|
715
|
+
target=target,
|
|
716
|
+
weight=weight,
|
|
717
|
+
title=title,
|
|
718
|
+
style=style,
|
|
719
|
+
sort_by=sort_by,
|
|
720
|
+
ascending=ascending,
|
|
721
|
+
node_list=node_list,
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
def fplot_treemap(
|
|
725
|
+
self,
|
|
726
|
+
path: str,
|
|
727
|
+
values: str,
|
|
728
|
+
style: StyleTemplate = TREEMAP_STYLE_TEMPLATE,
|
|
729
|
+
title: Optional[str] = None,
|
|
730
|
+
color: Optional[str] = None,
|
|
731
|
+
sort_by: Optional[str] = None,
|
|
732
|
+
max_values: int = 100,
|
|
733
|
+
ascending: bool = False,
|
|
734
|
+
fig: Optional[go.Figure] = None,
|
|
735
|
+
) -> go.Figure:
|
|
736
|
+
"""Plot a treemap on a new Plotly figure.
|
|
737
|
+
|
|
738
|
+
Parameters
|
|
739
|
+
----------
|
|
740
|
+
path : str
|
|
741
|
+
Column representing the hierarchy path.
|
|
742
|
+
values : str
|
|
743
|
+
Column with values for the treemap areas.
|
|
744
|
+
style : StyleTemplate, optional
|
|
745
|
+
Styling template. The default is `TREEMAP_STYLE_TEMPLATE`.
|
|
746
|
+
title : str, optional
|
|
747
|
+
Chart title.
|
|
748
|
+
color : str, optional
|
|
749
|
+
Column to use for color coding.
|
|
750
|
+
sort_by : str, optional
|
|
751
|
+
Column to sort by.
|
|
752
|
+
max_values : int, optional
|
|
753
|
+
Maximum number of items to display. The default is 100.
|
|
754
|
+
ascending : bool, optional
|
|
755
|
+
Sort order. The default is `False`.
|
|
756
|
+
fig : go.Figure, optional
|
|
757
|
+
Existing Plotly figure to add to. If None, a new figure is created.
|
|
758
|
+
|
|
759
|
+
Returns
|
|
760
|
+
-------
|
|
761
|
+
go.Figure
|
|
762
|
+
The Plotly figure with the treemap.
|
|
763
|
+
"""
|
|
764
|
+
return fplot_treemap(
|
|
765
|
+
pd_df=self._obj,
|
|
766
|
+
path=path,
|
|
767
|
+
values=values,
|
|
768
|
+
title=title,
|
|
769
|
+
style=style,
|
|
770
|
+
color=color,
|
|
771
|
+
sort_by=sort_by,
|
|
772
|
+
ascending=ascending,
|
|
773
|
+
max_values=max_values,
|
|
774
|
+
fig=fig,
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
def fplot_composite_treemap(
|
|
778
|
+
self,
|
|
779
|
+
paths: List[str],
|
|
780
|
+
values: str,
|
|
781
|
+
style: StyleTemplate = TREEMAP_STYLE_TEMPLATE,
|
|
782
|
+
title: Optional[str] = None,
|
|
783
|
+
color: Optional[str] = None,
|
|
784
|
+
sort_by: Optional[str] = None,
|
|
785
|
+
max_values: int = 100,
|
|
786
|
+
ascending: bool = False,
|
|
787
|
+
fig: Optional[go.Figure] = None,
|
|
788
|
+
) -> Optional[go.Figure]:
|
|
789
|
+
"""Plot a composite treemap on a new Plotly figure.
|
|
790
|
+
|
|
791
|
+
Parameters
|
|
792
|
+
----------
|
|
793
|
+
paths : list[str]
|
|
794
|
+
Columns representing the hierarchy paths for each treemap.
|
|
795
|
+
values : str
|
|
796
|
+
Column with values for the treemap areas.
|
|
797
|
+
style : StyleTemplate, optional
|
|
798
|
+
Styling template. The default is `TREEMAP_STYLE_TEMPLATE`.
|
|
799
|
+
title : str, optional
|
|
800
|
+
Chart title.
|
|
801
|
+
color : str, optional
|
|
802
|
+
Column to use for color coding.
|
|
803
|
+
sort_by : str, optional
|
|
804
|
+
Column to sort by.
|
|
805
|
+
max_values : int, optional
|
|
806
|
+
Maximum number of items to display. The default is 100.
|
|
807
|
+
ascending : bool, optional
|
|
808
|
+
Sort order. The default is `False`.
|
|
809
|
+
fig : go.Figure, optional
|
|
810
|
+
Existing Plotly figure to add to. If None, a new figure is created.
|
|
811
|
+
|
|
812
|
+
Returns
|
|
813
|
+
-------
|
|
814
|
+
go.Figure, optional
|
|
815
|
+
The Plotly figure with the composite treemap, or None if the input data is empty.
|
|
816
|
+
"""
|
|
817
|
+
pd_dfs: Dict[str, pd.DataFrame] = {}
|
|
818
|
+
for path in paths:
|
|
819
|
+
pd_dfs[path] = self._obj
|
|
820
|
+
|
|
821
|
+
return plot_composite_treemap(
|
|
822
|
+
pd_dfs=pd_dfs,
|
|
823
|
+
values=values,
|
|
824
|
+
title=title,
|
|
825
|
+
style=style,
|
|
826
|
+
color=color,
|
|
827
|
+
sort_by=sort_by,
|
|
828
|
+
ascending=ascending,
|
|
829
|
+
max_values=max_values,
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
__all__ = [
|
|
834
|
+
"DataFrameAccessor",
|
|
835
|
+
"StyleTemplate",
|
|
836
|
+
"aplot_bubble",
|
|
837
|
+
"aplot_network",
|
|
838
|
+
"aplot_network_components",
|
|
839
|
+
"aplot_table",
|
|
840
|
+
"aplot_timeserie",
|
|
841
|
+
"aplot_wordcloud",
|
|
842
|
+
"fplot_bubble",
|
|
843
|
+
"fplot_network",
|
|
844
|
+
"fplot_table",
|
|
845
|
+
"fplot_timeserie",
|
|
846
|
+
"fplot_wordcloud",
|
|
847
|
+
"fplot_treemap",
|
|
848
|
+
"plot_composite_bubble",
|
|
849
|
+
"plot_composite_treemap",
|
|
850
|
+
]
|