lets-plot 4.4.1__cp39-cp39-macosx_11_0_arm64.whl → 4.5.0__cp39-cp39-macosx_11_0_arm64.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.
Potentially problematic release.
This version of lets-plot might be problematic. Click here for more details.
- lets_plot/__init__.py +1 -1
- lets_plot/_version.py +1 -1
- lets_plot/bistro/corr.py +6 -1
- lets_plot/bistro/joint.py +7 -2
- lets_plot/bistro/qq.py +30 -8
- lets_plot/bistro/residual.py +6 -1
- lets_plot/bistro/waterfall.py +12 -7
- lets_plot/export/ggsave_.py +21 -1
- lets_plot/package_data/lets-plot.min.js +1 -1
- lets_plot/plot/__init__.py +3 -1
- lets_plot/plot/annotation.py +1 -1
- lets_plot/plot/core.py +11 -5
- lets_plot/plot/expand_limits_.py +78 -0
- lets_plot/plot/facet.py +9 -5
- lets_plot/plot/geom.py +691 -183
- lets_plot/plot/geom_function_.py +13 -3
- lets_plot/plot/geom_imshow_.py +1 -0
- lets_plot/plot/geom_livemap_.py +32 -0
- lets_plot/plot/gggrid_.py +5 -4
- lets_plot/plot/ggtb_.py +46 -1
- lets_plot/plot/label.py +2 -2
- lets_plot/plot/sampling.py +14 -4
- lets_plot/plot/scale.py +40 -40
- lets_plot/plot/scale_colormap_mpl.py +3 -3
- lets_plot/plot/scale_identity_.py +11 -19
- lets_plot/plot/scale_position.py +14 -14
- lets_plot/plot/stat.py +44 -4
- lets_plot/plot/subplots.py +1 -1
- lets_plot/plot/theme_.py +93 -14
- lets_plot/plot/tooltip.py +1 -1
- lets_plot/tilesets.py +4 -69
- {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/METADATA +34 -18
- {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/RECORD +37 -36
- {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/WHEEL +1 -1
- lets_plot_kotlin_bridge.cpython-39-darwin.so +0 -0
- {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/LICENSE +0 -0
- {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/top_level.txt +0 -0
|
@@ -54,7 +54,7 @@ def scale_identity(aesthetic, *,
|
|
|
54
54
|
- 'Num {}' -> 'Num 12.456789'
|
|
55
55
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
56
56
|
|
|
57
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
57
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
58
58
|
|
|
59
59
|
Returns
|
|
60
60
|
-------
|
|
@@ -124,7 +124,7 @@ def scale_color_identity(name=None, breaks=None, labels=None, lablim=None, limit
|
|
|
124
124
|
- 'Num {}' -> 'Num 12.456789'
|
|
125
125
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
126
126
|
|
|
127
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
127
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
128
128
|
|
|
129
129
|
Returns
|
|
130
130
|
-------
|
|
@@ -133,11 +133,7 @@ def scale_color_identity(name=None, breaks=None, labels=None, lablim=None, limit
|
|
|
133
133
|
|
|
134
134
|
Notes
|
|
135
135
|
-----
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
- names of colors (e.g. 'green'),
|
|
139
|
-
- hex codes of colors (e.g. 'x00ff00'),
|
|
140
|
-
- css colors (e.g. 'rgb(0, 255, 0)').
|
|
136
|
+
For more info about input data format, see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
|
|
141
137
|
|
|
142
138
|
Examples
|
|
143
139
|
--------
|
|
@@ -197,7 +193,7 @@ def scale_fill_identity(name=None, breaks=None, labels=None, lablim=None, limits
|
|
|
197
193
|
- 'Num {}' -> 'Num 12.456789'
|
|
198
194
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
199
195
|
|
|
200
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
196
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
201
197
|
|
|
202
198
|
Returns
|
|
203
199
|
-------
|
|
@@ -206,11 +202,7 @@ def scale_fill_identity(name=None, breaks=None, labels=None, lablim=None, limits
|
|
|
206
202
|
|
|
207
203
|
Notes
|
|
208
204
|
-----
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
- names of colors (e.g. 'green'),
|
|
212
|
-
- hex codes of colors (e.g. 'x00ff00'),
|
|
213
|
-
- css colors (e.g. 'rgb(0, 255, 0)').
|
|
205
|
+
For more info about input data format, see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
|
|
214
206
|
|
|
215
207
|
Examples
|
|
216
208
|
--------
|
|
@@ -270,7 +262,7 @@ def scale_shape_identity(name=None, breaks=None, labels=None, lablim=None, limit
|
|
|
270
262
|
- 'Num {}' -> 'Num 12.456789'
|
|
271
263
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
272
264
|
|
|
273
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
265
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
274
266
|
|
|
275
267
|
Returns
|
|
276
268
|
-------
|
|
@@ -343,7 +335,7 @@ def scale_linetype_identity(name=None, breaks=None, labels=None, lablim=None, li
|
|
|
343
335
|
- 'Num {}' -> 'Num 12.456789'
|
|
344
336
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
345
337
|
|
|
346
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
338
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
347
339
|
|
|
348
340
|
Returns
|
|
349
341
|
-------
|
|
@@ -419,7 +411,7 @@ def scale_alpha_identity(name=None, breaks=None, labels=None, lablim=None, limit
|
|
|
419
411
|
- 'Num {}' -> 'Num 12.456789'
|
|
420
412
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
421
413
|
|
|
422
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
414
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
423
415
|
|
|
424
416
|
Returns
|
|
425
417
|
-------
|
|
@@ -489,7 +481,7 @@ def scale_size_identity(name=None, breaks=None, labels=None, lablim=None, limits
|
|
|
489
481
|
- 'Num {}' -> 'Num 12.456789'
|
|
490
482
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
491
483
|
|
|
492
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
484
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
493
485
|
|
|
494
486
|
Returns
|
|
495
487
|
-------
|
|
@@ -559,7 +551,7 @@ def scale_linewidth_identity(name=None, breaks=None, labels=None, lablim=None, l
|
|
|
559
551
|
- 'Num {}' -> 'Num 12.456789'
|
|
560
552
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
561
553
|
|
|
562
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
554
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
563
555
|
|
|
564
556
|
Returns
|
|
565
557
|
-------
|
|
@@ -627,7 +619,7 @@ def scale_stroke_identity(name=None, breaks=None, labels=None, lablim=None, limi
|
|
|
627
619
|
- 'Num {}' -> 'Num 12.456789'
|
|
628
620
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
629
621
|
|
|
630
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
622
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
631
623
|
|
|
632
624
|
Returns
|
|
633
625
|
-------
|
lets_plot/plot/scale_position.py
CHANGED
|
@@ -65,7 +65,7 @@ def scale_x_continuous(name=None, *,
|
|
|
65
65
|
- 'Num {}' -> 'Num 12.456789'
|
|
66
66
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
67
67
|
|
|
68
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
68
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
69
69
|
position : str
|
|
70
70
|
The position of the axis:
|
|
71
71
|
|
|
@@ -149,7 +149,7 @@ def scale_y_continuous(name=None, *,
|
|
|
149
149
|
- 'Num {}' -> 'Num 12.456789'
|
|
150
150
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
151
151
|
|
|
152
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
152
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
153
153
|
position : str
|
|
154
154
|
The position of the axis:
|
|
155
155
|
|
|
@@ -230,7 +230,7 @@ def scale_x_log10(name=None, *,
|
|
|
230
230
|
- 'Num {}' -> 'Num 12.456789'
|
|
231
231
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
232
232
|
|
|
233
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
233
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
234
234
|
position : str
|
|
235
235
|
The position of the axis:
|
|
236
236
|
|
|
@@ -307,7 +307,7 @@ def scale_y_log10(name=None, *,
|
|
|
307
307
|
- 'Num {}' -> 'Num 12.456789'
|
|
308
308
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
309
309
|
|
|
310
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
310
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
311
311
|
position : str
|
|
312
312
|
The position of the axis:
|
|
313
313
|
|
|
@@ -384,7 +384,7 @@ def scale_x_log2(name=None, *,
|
|
|
384
384
|
- 'Num {}' -> 'Num 12.456789'
|
|
385
385
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
386
386
|
|
|
387
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
387
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
388
388
|
position : str
|
|
389
389
|
The position of the axis:
|
|
390
390
|
|
|
@@ -461,7 +461,7 @@ def scale_y_log2(name=None, *,
|
|
|
461
461
|
- 'Num {}' -> 'Num 12.456789'
|
|
462
462
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
463
463
|
|
|
464
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
464
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
465
465
|
position : str
|
|
466
466
|
The position of the axis:
|
|
467
467
|
|
|
@@ -538,7 +538,7 @@ def scale_x_reverse(name=None, *,
|
|
|
538
538
|
- 'Num {}' -> 'Num 12.456789'
|
|
539
539
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
540
540
|
|
|
541
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
541
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
542
542
|
position : str
|
|
543
543
|
The position of the axis:
|
|
544
544
|
|
|
@@ -615,7 +615,7 @@ def scale_y_reverse(name=None, *,
|
|
|
615
615
|
- 'Num {}' -> 'Num 12.456789'
|
|
616
616
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
617
617
|
|
|
618
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
618
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
619
619
|
position : str
|
|
620
620
|
The position of the axis:
|
|
621
621
|
|
|
@@ -699,7 +699,7 @@ def scale_x_discrete(name=None, *,
|
|
|
699
699
|
- 'Num {}' -> 'Num 12.456789'
|
|
700
700
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
701
701
|
|
|
702
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
702
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
703
703
|
position : str
|
|
704
704
|
The position of the axis:
|
|
705
705
|
|
|
@@ -784,7 +784,7 @@ def scale_x_discrete_reversed(name=None, *,
|
|
|
784
784
|
- 'Num {}' -> 'Num 12.456789'
|
|
785
785
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
786
786
|
|
|
787
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
787
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
788
788
|
position : str
|
|
789
789
|
The position of the axis:
|
|
790
790
|
|
|
@@ -868,7 +868,7 @@ def scale_y_discrete(name=None, *,
|
|
|
868
868
|
- 'Num {}' -> 'Num 12.456789'
|
|
869
869
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
870
870
|
|
|
871
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
871
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
872
872
|
position : str
|
|
873
873
|
The position of the axis:
|
|
874
874
|
|
|
@@ -953,7 +953,7 @@ def scale_y_discrete_reversed(name=None, *,
|
|
|
953
953
|
- 'Num {}' -> 'Num 12.456789'
|
|
954
954
|
- 'TTL: {.2f}$' -> 'TTL: 12.45$'
|
|
955
955
|
|
|
956
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
956
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
957
957
|
position : str
|
|
958
958
|
The position of the axis:
|
|
959
959
|
|
|
@@ -1041,7 +1041,7 @@ def scale_x_datetime(name=None, *,
|
|
|
1041
1041
|
- '%B %Y' -> 'August 2019'
|
|
1042
1042
|
- '%a, %e %b %Y %H:%M:%S' -> 'Tue, 6 Aug 2019 04:46:35'
|
|
1043
1043
|
|
|
1044
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
1044
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
1045
1045
|
position : str
|
|
1046
1046
|
The position of the axis:
|
|
1047
1047
|
|
|
@@ -1128,7 +1128,7 @@ def scale_y_datetime(name=None, *,
|
|
|
1128
1128
|
- '%B %Y' -> 'August 2019'
|
|
1129
1129
|
- '%a, %e %b %Y %H:%M:%S' -> 'Tue, 6 Aug 2019 04:46:35'
|
|
1130
1130
|
|
|
1131
|
-
For more info see https://lets-plot.org/python/pages/formats.html.
|
|
1131
|
+
For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
1132
1132
|
position : str
|
|
1133
1133
|
The position of the axis:
|
|
1134
1134
|
|
lets_plot/plot/stat.py
CHANGED
|
@@ -9,7 +9,8 @@ __all__ = ['stat_summary', 'stat_summary_bin', 'stat_ecdf', 'stat_sum']
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def stat_summary(mapping=None, *, data=None, geom=None,
|
|
12
|
-
position=None, show_legend=None,
|
|
12
|
+
position=None, show_legend=None, inherit_aes=None,
|
|
13
|
+
sampling=None, tooltips=None,
|
|
13
14
|
orientation=None,
|
|
14
15
|
fun=None, fun_min=None, fun_max=None,
|
|
15
16
|
quantiles=None,
|
|
@@ -35,12 +36,15 @@ def stat_summary(mapping=None, *, data=None, geom=None,
|
|
|
35
36
|
'stack' or 'identity', or the result of calling a position adjustment function (e.g., `position_dodge()` etc.).
|
|
36
37
|
show_legend : bool, default=True
|
|
37
38
|
False - do not show legend for this layer.
|
|
39
|
+
inherit_aes : bool, default=True
|
|
40
|
+
False - do not combine the layer aesthetic mappings with the plot shared mappings.
|
|
38
41
|
sampling : `FeatureSpec`
|
|
39
42
|
Result of the call to the `sampling_xxx()` function.
|
|
40
43
|
To prevent any sampling for this layer pass value "none" (string "none").
|
|
41
44
|
tooltips : `layer_tooltips`
|
|
42
45
|
Result of the call to the `layer_tooltips()` function.
|
|
43
46
|
Specify appearance, style and content.
|
|
47
|
+
Set tooltips='none' to hide tooltips from the layer.
|
|
44
48
|
orientation : str
|
|
45
49
|
Specify the axis that the layer's stat and geom should run along.
|
|
46
50
|
The default value (None) automatically determines the orientation based on the aesthetic mapping.
|
|
@@ -80,6 +84,11 @@ def stat_summary(mapping=None, *, data=None, geom=None,
|
|
|
80
84
|
- ..ymin.. : result of calculating of `fun_min`.
|
|
81
85
|
- ..ymax.. : result of calculating of `fun_max`.
|
|
82
86
|
|
|
87
|
+
----
|
|
88
|
+
|
|
89
|
+
To hide axis tooltips, set 'blank' or the result of `element_blank()`
|
|
90
|
+
to the `axis_tooltip` or `axis_tooltip_x` parameter of the `theme()`.
|
|
91
|
+
|
|
83
92
|
Examples
|
|
84
93
|
--------
|
|
85
94
|
.. jupyter-execute::
|
|
@@ -138,6 +147,7 @@ def stat_summary(mapping=None, *, data=None, geom=None,
|
|
|
138
147
|
stat='summary',
|
|
139
148
|
position=position,
|
|
140
149
|
show_legend=show_legend,
|
|
150
|
+
inherit_aes=inherit_aes,
|
|
141
151
|
sampling=sampling,
|
|
142
152
|
tooltips=tooltips,
|
|
143
153
|
orientation=orientation,
|
|
@@ -148,7 +158,8 @@ def stat_summary(mapping=None, *, data=None, geom=None,
|
|
|
148
158
|
|
|
149
159
|
|
|
150
160
|
def stat_summary_bin(mapping=None, *, data=None, geom=None,
|
|
151
|
-
position=None, show_legend=None,
|
|
161
|
+
position=None, show_legend=None, inherit_aes=None,
|
|
162
|
+
sampling=None, tooltips=None,
|
|
152
163
|
orientation=None,
|
|
153
164
|
fun=None, fun_min=None, fun_max=None,
|
|
154
165
|
quantiles=None,
|
|
@@ -177,12 +188,15 @@ def stat_summary_bin(mapping=None, *, data=None, geom=None,
|
|
|
177
188
|
'stack' or 'identity', or the result of calling a position adjustment function (e.g., `position_dodge()` etc.).
|
|
178
189
|
show_legend : bool, default=True
|
|
179
190
|
False - do not show legend for this layer.
|
|
191
|
+
inherit_aes : bool, default=True
|
|
192
|
+
False - do not combine the layer aesthetic mappings with the plot shared mappings.
|
|
180
193
|
sampling : `FeatureSpec`
|
|
181
194
|
Result of the call to the `sampling_xxx()` function.
|
|
182
195
|
To prevent any sampling for this layer pass value "none" (string "none").
|
|
183
196
|
tooltips : `layer_tooltips`
|
|
184
197
|
Result of the call to the `layer_tooltips()` function.
|
|
185
198
|
Specify appearance, style and content.
|
|
199
|
+
Set tooltips='none' to hide tooltips from the layer.
|
|
186
200
|
orientation : str, default='x'
|
|
187
201
|
Specify the axis that the layer's stat and geom should run along.
|
|
188
202
|
Possible values: 'x', 'y'.
|
|
@@ -231,6 +245,11 @@ def stat_summary_bin(mapping=None, *, data=None, geom=None,
|
|
|
231
245
|
- ..ymin.. : result of calculating of `fun_min`.
|
|
232
246
|
- ..ymax.. : result of calculating of `fun_max`.
|
|
233
247
|
|
|
248
|
+
----
|
|
249
|
+
|
|
250
|
+
To hide axis tooltips, set 'blank' or the result of `element_blank()`
|
|
251
|
+
to the `axis_tooltip` or `axis_tooltip_x` parameter of the `theme()`.
|
|
252
|
+
|
|
234
253
|
Examples
|
|
235
254
|
--------
|
|
236
255
|
.. jupyter-execute::
|
|
@@ -290,6 +309,7 @@ def stat_summary_bin(mapping=None, *, data=None, geom=None,
|
|
|
290
309
|
stat='summarybin',
|
|
291
310
|
position=position,
|
|
292
311
|
show_legend=show_legend,
|
|
312
|
+
inherit_aes=inherit_aes,
|
|
293
313
|
sampling=sampling,
|
|
294
314
|
tooltips=tooltips,
|
|
295
315
|
orientation=orientation,
|
|
@@ -302,7 +322,8 @@ def stat_summary_bin(mapping=None, *, data=None, geom=None,
|
|
|
302
322
|
|
|
303
323
|
|
|
304
324
|
def stat_ecdf(mapping=None, *, data=None, geom=None,
|
|
305
|
-
position=None, show_legend=None,
|
|
325
|
+
position=None, show_legend=None, inherit_aes=None,
|
|
326
|
+
sampling=None, tooltips=None,
|
|
306
327
|
orientation=None,
|
|
307
328
|
n=None, pad=None,
|
|
308
329
|
color_by=None,
|
|
@@ -327,12 +348,15 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
|
|
|
327
348
|
'stack' or 'identity', or the result of calling a position adjustment function (e.g., `position_dodge()` etc.).
|
|
328
349
|
show_legend : bool, default=True
|
|
329
350
|
False - do not show legend for this layer.
|
|
351
|
+
inherit_aes : bool, default=True
|
|
352
|
+
False - do not combine the layer aesthetic mappings with the plot shared mappings.
|
|
330
353
|
sampling : `FeatureSpec`
|
|
331
354
|
Result of the call to the `sampling_xxx()` function.
|
|
332
355
|
To prevent any sampling for this layer pass value "none" (string "none").
|
|
333
356
|
tooltips : `layer_tooltips`
|
|
334
357
|
Result of the call to the `layer_tooltips()` function.
|
|
335
358
|
Specify appearance, style and content.
|
|
359
|
+
Set tooltips='none' to hide tooltips from the layer.
|
|
336
360
|
orientation : str, default='x'
|
|
337
361
|
Specify the axis that the layer's stat and geom should run along.
|
|
338
362
|
Possible values: 'x', 'y'.
|
|
@@ -364,6 +388,11 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
|
|
|
364
388
|
|
|
365
389
|
In addition, you can use any aesthetics, available for the geometry defined by the `geom` parameter.
|
|
366
390
|
|
|
391
|
+
----
|
|
392
|
+
|
|
393
|
+
To hide axis tooltips, set 'blank' or the result of `element_blank()`
|
|
394
|
+
to the `axis_tooltip` or `axis_tooltip_x` parameter of the `theme()`.
|
|
395
|
+
|
|
367
396
|
Examples
|
|
368
397
|
--------
|
|
369
398
|
.. jupyter-execute::
|
|
@@ -426,6 +455,7 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
|
|
|
426
455
|
stat='ecdf',
|
|
427
456
|
position=position,
|
|
428
457
|
show_legend=show_legend,
|
|
458
|
+
inherit_aes=inherit_aes,
|
|
429
459
|
sampling=sampling,
|
|
430
460
|
tooltips=tooltips,
|
|
431
461
|
orientation=orientation,
|
|
@@ -435,7 +465,8 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
|
|
|
435
465
|
**other_args)
|
|
436
466
|
|
|
437
467
|
|
|
438
|
-
def stat_sum(mapping=None, *, data=None, geom=None, position=None, show_legend=None,
|
|
468
|
+
def stat_sum(mapping=None, *, data=None, geom=None, position=None, show_legend=None, inherit_aes=None,
|
|
469
|
+
sampling=None, tooltips=None,
|
|
439
470
|
color_by=None, fill_by=None,
|
|
440
471
|
**other_args):
|
|
441
472
|
"""
|
|
@@ -458,12 +489,15 @@ def stat_sum(mapping=None, *, data=None, geom=None, position=None, show_legend=N
|
|
|
458
489
|
'stack' or 'identity', or the result of calling a position adjustment function (e.g., `position_dodge()` etc.).
|
|
459
490
|
show_legend : bool, default=True
|
|
460
491
|
False - do not show legend for this layer.
|
|
492
|
+
inherit_aes : bool, default=True
|
|
493
|
+
False - do not combine the layer aesthetic mappings with the plot shared mappings.
|
|
461
494
|
sampling : `FeatureSpec`
|
|
462
495
|
Result of the call to the `sampling_xxx()` function.
|
|
463
496
|
To prevent any sampling for this layer pass value "none" (string "none").
|
|
464
497
|
tooltips : `layer_tooltips`
|
|
465
498
|
Result of the call to the `layer_tooltips()` function.
|
|
466
499
|
Specify appearance, style and content.
|
|
500
|
+
Set tooltips='none' to hide tooltips from the layer.
|
|
467
501
|
color_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='color'
|
|
468
502
|
Define the color aesthetic for the geometry.
|
|
469
503
|
fill_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='fill'
|
|
@@ -494,6 +528,11 @@ def stat_sum(mapping=None, *, data=None, geom=None, position=None, show_legend=N
|
|
|
494
528
|
|
|
495
529
|
In addition, you can use any aesthetics, available for the geometry defined by the `geom` parameter.
|
|
496
530
|
|
|
531
|
+
----
|
|
532
|
+
|
|
533
|
+
To hide axis tooltips, set 'blank' or the result of `element_blank()`
|
|
534
|
+
to the `axis_tooltip`, `axis_tooltip_x` or `axis_tooltip_y` parameter of the `theme()`.
|
|
535
|
+
|
|
497
536
|
Examples
|
|
498
537
|
--------
|
|
499
538
|
.. jupyter-execute::
|
|
@@ -534,6 +573,7 @@ def stat_sum(mapping=None, *, data=None, geom=None, position=None, show_legend=N
|
|
|
534
573
|
stat='sum',
|
|
535
574
|
position=position,
|
|
536
575
|
show_legend=show_legend,
|
|
576
|
+
inherit_aes=inherit_aes,
|
|
537
577
|
sampling=sampling,
|
|
538
578
|
tooltips=tooltips,
|
|
539
579
|
color_by=color_by,
|
lets_plot/plot/subplots.py
CHANGED
|
@@ -67,7 +67,7 @@ class SupPlotsSpec(FeatureSpec):
|
|
|
67
67
|
supplots = supplots.__add__(spec)
|
|
68
68
|
return supplots
|
|
69
69
|
|
|
70
|
-
elif isinstance(other, FeatureSpec) and other.kind in ["ggsize", "theme"]:
|
|
70
|
+
elif isinstance(other, FeatureSpec) and other.kind in ["ggsize", "theme", "ggtoolbar"]:
|
|
71
71
|
|
|
72
72
|
supplots = SupPlotsSpec.duplicate(self)
|
|
73
73
|
# ToDo: duplication!
|
lets_plot/plot/theme_.py
CHANGED
|
@@ -42,6 +42,12 @@ def theme(*,
|
|
|
42
42
|
legend_background=None,
|
|
43
43
|
legend_text=None, legend_title=None,
|
|
44
44
|
legend_position=None, legend_justification=None, legend_direction=None,
|
|
45
|
+
legend_margin=None,
|
|
46
|
+
legend_spacing=None, legend_spacing_x=None,legend_spacing_y=None,
|
|
47
|
+
legend_key=None,
|
|
48
|
+
legend_key_size=None, legend_key_width=None, legend_key_height=None,
|
|
49
|
+
legend_key_spacing=None, legend_key_spacing_x=None, legend_key_spacing_y=None,
|
|
50
|
+
legend_box=None, legend_box_just=None, legend_box_spacing=None,
|
|
45
51
|
# ToDo: other legend options...
|
|
46
52
|
|
|
47
53
|
panel_background=None,
|
|
@@ -72,8 +78,8 @@ def theme(*,
|
|
|
72
78
|
plot_title_position=None,
|
|
73
79
|
plot_caption_position=None,
|
|
74
80
|
|
|
75
|
-
strip_background=None,
|
|
76
|
-
strip_text=None,
|
|
81
|
+
strip_background=None, strip_background_x=None, strip_background_y=None,
|
|
82
|
+
strip_text=None, strip_text_x=None, strip_text_y=None,
|
|
77
83
|
# ToDo: strip.placement
|
|
78
84
|
|
|
79
85
|
axis_tooltip=None, axis_tooltip_x=None, axis_tooltip_y=None,
|
|
@@ -92,13 +98,23 @@ def theme(*,
|
|
|
92
98
|
|
|
93
99
|
Parameters
|
|
94
100
|
----------
|
|
95
|
-
exponent_format : {'e', 'pow'}, default='e'
|
|
101
|
+
exponent_format : {'e', 'pow', 'pow_full'} or tuple, default='e'
|
|
96
102
|
Format for numeric labels in scientific notation.
|
|
97
103
|
|
|
98
|
-
- e for "e" notation (e.g. 1e+6)
|
|
99
|
-
-
|
|
104
|
+
- e for "e" notation (e.g. 1e+6);
|
|
105
|
+
- pow_full for "power" notation (e.g. 1x10^6). This will enable superscript formatting for the exponent;
|
|
106
|
+
- pow works as pow_full but will shorten powers of 10 (e.g. 10^6 instead of 1x10^6).
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
If parameter is a tuple, then it should be a three-element tuple:
|
|
109
|
+
|
|
110
|
+
- the first element is the format - 'e', 'pow', 'pow_full';
|
|
111
|
+
- the second element is minimum exponent value from which to use scientific notation (default is -7);
|
|
112
|
+
- the third element is maximum exponent value from which to use scientific notation (default is taken from `precision` of the current formatting, see `Formatting <https://lets-plot.org/python/pages/formats.html>`__).
|
|
113
|
+
|
|
114
|
+
Minimum and maximum exponent values are only taken into account when "g" format is used,
|
|
115
|
+
see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
|
|
116
|
+
|
|
117
|
+
Superscript is not supported when exporting to PNG/PDF.
|
|
102
118
|
line : str or dict
|
|
103
119
|
All line elements.
|
|
104
120
|
Set 'blank' or result of `element_blank()` to draw nothing and assign no space.
|
|
@@ -167,6 +183,44 @@ def theme(*,
|
|
|
167
183
|
For string parameter the only possible value is 'center'.
|
|
168
184
|
legend_direction : {'horizontal', 'vertical'}
|
|
169
185
|
Layout of items in legends.
|
|
186
|
+
legend_margin : number or list of numbers
|
|
187
|
+
Margin around each legend.
|
|
188
|
+
The margin may be specified using a number or a list of numbers:
|
|
189
|
+
|
|
190
|
+
- a number or list of one number - the same margin it applied to all four sides;
|
|
191
|
+
- a list of two numbers - the first margin applies to the top and bottom, the second - to the left and right;
|
|
192
|
+
- a list of three numbers - the first margin applies to the top, the second - to the right and left, the third - to the bottom;
|
|
193
|
+
- a list of four numbers - the margins are applied to the top, right, bottom and left in that order.
|
|
194
|
+
|
|
195
|
+
It is acceptable to use None for any side; in this case, the default value for the legend margin side will be used.
|
|
196
|
+
legend_spacing : float
|
|
197
|
+
Spacing between legends.
|
|
198
|
+
legend_spacing_x : float
|
|
199
|
+
Spacing between legends in the horizontal direction, inherited from `legend_spacing`.
|
|
200
|
+
legend_spacing_y : float
|
|
201
|
+
Spacing between legends in the vertical direction, inherited from `legend_spacing`.
|
|
202
|
+
legend_key : str or dict
|
|
203
|
+
Background underneath legend keys.
|
|
204
|
+
Set 'blank' or result of `element_blank()` to draw nothing.
|
|
205
|
+
Set `element_rect()` to specify legend key background parameters, inherited from `rect`.
|
|
206
|
+
legend_key_size : float
|
|
207
|
+
Size of legend keys.
|
|
208
|
+
legend_key_width : float
|
|
209
|
+
Key background width, inherited from `legend_key_size`.
|
|
210
|
+
legend_key_height : float
|
|
211
|
+
Key background height, inherited from `legend_key_size`.
|
|
212
|
+
legend_key_spacing : float
|
|
213
|
+
Spacing between legend keys.
|
|
214
|
+
legend_key_spacing_x : float
|
|
215
|
+
Spacing between legend keys in the horizontal direction, inherited from `legend_key_spacing`.
|
|
216
|
+
legend_key_spacing_y : float
|
|
217
|
+
Spacing between legend keys in the vertical direction, inherited from `legend_key_spacing`.
|
|
218
|
+
legend_box : {'horizontal', 'vertical'}
|
|
219
|
+
Arrangement of multiple legends.
|
|
220
|
+
legend_box_just : {'left', 'right', 'bottom', 'top', 'center'}
|
|
221
|
+
Justification of each legend within the overall bounding box, when there are multiple legends.
|
|
222
|
+
legend_box_spacing : float
|
|
223
|
+
Spacing between plotting area and legend box.
|
|
170
224
|
panel_background : str or dict
|
|
171
225
|
Background of plotting area.
|
|
172
226
|
Set 'blank' or result of `element_blank()` to draw nothing.
|
|
@@ -247,10 +301,26 @@ def theme(*,
|
|
|
247
301
|
Background of facet labels.
|
|
248
302
|
Set 'blank' or result of `element_blank()` to draw nothing.
|
|
249
303
|
Set `element_rect()` to specify facet label background parameters, inherited from `rect`.
|
|
304
|
+
strip_background_x : str or dict
|
|
305
|
+
Horizontal facet background.
|
|
306
|
+
Set 'blank' or result of `element_blank()` to draw nothing.
|
|
307
|
+
Set `element_rect()` to specify facet label background parameters, inherited from `strip_background`.
|
|
308
|
+
strip_background_y : str or dict
|
|
309
|
+
Vertical facet background.
|
|
310
|
+
Set 'blank' or result of `element_blank()` to draw nothing.
|
|
311
|
+
Set `element_rect()` to specify facet label background parameters, inherited from `strip_background`.
|
|
250
312
|
strip_text : str or dict
|
|
251
313
|
Facet labels.
|
|
252
314
|
Set 'blank' or result of `element_blank()` to draw nothing and assign no space.
|
|
253
315
|
Set `element_text()` to specify facet label parameters, inherited from `text`.
|
|
316
|
+
strip_text_x : str or dict
|
|
317
|
+
Horizontal facet labels.
|
|
318
|
+
Set 'blank' or result of `element_blank()` to draw nothing and assign no space.
|
|
319
|
+
Set `element_text()` to specify facet label parameters, inherited from `strip_text`.
|
|
320
|
+
strip_text_y : str or dict
|
|
321
|
+
Vertical facet labels.
|
|
322
|
+
Set 'blank' or result of `element_blank()` to draw nothing and assign no space.
|
|
323
|
+
Set `element_text()` to specify facet label parameters, inherited from `strip_text`.
|
|
254
324
|
axis_tooltip, axis_tooltip_x, axis_tooltip_y : str or dict
|
|
255
325
|
Axes tooltips.
|
|
256
326
|
Set 'blank' or result of `element_blank()` to draw nothing and assign no space.
|
|
@@ -396,10 +466,14 @@ def element_rect(
|
|
|
396
466
|
Border color.
|
|
397
467
|
size : int
|
|
398
468
|
Border size.
|
|
399
|
-
linetype : int or str
|
|
400
|
-
Type of the line.
|
|
401
|
-
|
|
402
|
-
|
|
469
|
+
linetype : int or str or list
|
|
470
|
+
Type of the line. Accepts the following values:
|
|
471
|
+
|
|
472
|
+
- Codes or names: 0 = 'blank', 1 = 'solid', 2 = 'dashed', 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'.
|
|
473
|
+
- A string of an even number (up to eight) of hexadecimal digits, specifying the lengths in consecutive positions.
|
|
474
|
+
- A list defines the pattern of dashes and gaps, either with an offset: [offset, [dash, gap, ...]], or without an offset: [dash, gap, ...].
|
|
475
|
+
|
|
476
|
+
For more info see `Line Types <https://lets-plot.org/python/pages/aesthetics.html#line-types>`__.
|
|
403
477
|
blank : bool, default=False
|
|
404
478
|
If True - draws nothing, and assigns no space.
|
|
405
479
|
|
|
@@ -443,9 +517,14 @@ def element_line(
|
|
|
443
517
|
Line color.
|
|
444
518
|
size : int
|
|
445
519
|
Line size.
|
|
446
|
-
linetype : int or str
|
|
447
|
-
Type of the line.
|
|
448
|
-
|
|
520
|
+
linetype : int or str or list
|
|
521
|
+
Type of the line. Accepts the following values:
|
|
522
|
+
|
|
523
|
+
- Codes or names: 0 = 'blank', 1 = 'solid', 2 = 'dashed', 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'.
|
|
524
|
+
- A string of an even number (up to eight) of hexadecimal digits, specifying the lengths in consecutive positions.
|
|
525
|
+
- A list defines the pattern of dashes and gaps, either with an offset: [offset, [dash, gap, ...]], or without an offset: [dash, gap, ...].
|
|
526
|
+
|
|
527
|
+
For more info see `Line Types <https://lets-plot.org/python/pages/aesthetics.html#line-types>`__.
|
|
449
528
|
blank : bool, default=False
|
|
450
529
|
If True - draws nothing, and assigns no space.
|
|
451
530
|
|
|
@@ -599,4 +678,4 @@ def element_geom(
|
|
|
599
678
|
theme(geom=element_geom(pen='dark_blue', paper='light_blue'))
|
|
600
679
|
|
|
601
680
|
"""
|
|
602
|
-
return locals()
|
|
681
|
+
return locals()
|
lets_plot/plot/tooltip.py
CHANGED