lets-plot 4.7.0rc1__cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.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.

Files changed (95) hide show
  1. lets_plot/__init__.py +283 -0
  2. lets_plot/_global_settings.py +196 -0
  3. lets_plot/_kbridge.py +141 -0
  4. lets_plot/_type_utils.py +133 -0
  5. lets_plot/_version.py +6 -0
  6. lets_plot/bistro/__init__.py +16 -0
  7. lets_plot/bistro/_plot2d_common.py +100 -0
  8. lets_plot/bistro/corr.py +447 -0
  9. lets_plot/bistro/im.py +196 -0
  10. lets_plot/bistro/joint.py +192 -0
  11. lets_plot/bistro/qq.py +207 -0
  12. lets_plot/bistro/residual.py +341 -0
  13. lets_plot/bistro/waterfall.py +333 -0
  14. lets_plot/export/__init__.py +6 -0
  15. lets_plot/export/ggsave_.py +141 -0
  16. lets_plot/frontend_context/__init__.py +8 -0
  17. lets_plot/frontend_context/_configuration.py +151 -0
  18. lets_plot/frontend_context/_frontend_ctx.py +16 -0
  19. lets_plot/frontend_context/_html_contexts.py +117 -0
  20. lets_plot/frontend_context/_intellij_python_json_ctx.py +38 -0
  21. lets_plot/frontend_context/_json_contexts.py +39 -0
  22. lets_plot/frontend_context/_jupyter_notebook_ctx.py +119 -0
  23. lets_plot/frontend_context/_mime_types.py +7 -0
  24. lets_plot/frontend_context/_static_html_page_ctx.py +27 -0
  25. lets_plot/frontend_context/_static_svg_ctx.py +26 -0
  26. lets_plot/frontend_context/_webbr_html_page_ctx.py +29 -0
  27. lets_plot/frontend_context/sandbox.py +5 -0
  28. lets_plot/geo_data/__init__.py +19 -0
  29. lets_plot/geo_data/core.py +331 -0
  30. lets_plot/geo_data/geocoder.py +977 -0
  31. lets_plot/geo_data/geocodes.py +512 -0
  32. lets_plot/geo_data/gis/__init__.py +0 -0
  33. lets_plot/geo_data/gis/fluent_dict.py +201 -0
  34. lets_plot/geo_data/gis/geocoding_service.py +42 -0
  35. lets_plot/geo_data/gis/geometry.py +91 -0
  36. lets_plot/geo_data/gis/json_request.py +232 -0
  37. lets_plot/geo_data/gis/json_response.py +308 -0
  38. lets_plot/geo_data/gis/request.py +492 -0
  39. lets_plot/geo_data/gis/response.py +247 -0
  40. lets_plot/geo_data/livemap_helper.py +65 -0
  41. lets_plot/geo_data/to_geo_data_frame.py +141 -0
  42. lets_plot/geo_data/type_assertion.py +34 -0
  43. lets_plot/geo_data_internals/__init__.py +4 -0
  44. lets_plot/geo_data_internals/constants.py +13 -0
  45. lets_plot/geo_data_internals/utils.py +33 -0
  46. lets_plot/mapping.py +115 -0
  47. lets_plot/package_data/lets-plot.min.js +3 -0
  48. lets_plot/plot/__init__.py +64 -0
  49. lets_plot/plot/_global_theme.py +14 -0
  50. lets_plot/plot/annotation.py +290 -0
  51. lets_plot/plot/coord.py +242 -0
  52. lets_plot/plot/core.py +1060 -0
  53. lets_plot/plot/expand_limits_.py +78 -0
  54. lets_plot/plot/facet.py +206 -0
  55. lets_plot/plot/font_features.py +71 -0
  56. lets_plot/plot/geom.py +8839 -0
  57. lets_plot/plot/geom_extras.py +53 -0
  58. lets_plot/plot/geom_function_.py +216 -0
  59. lets_plot/plot/geom_imshow_.py +392 -0
  60. lets_plot/plot/geom_livemap_.py +310 -0
  61. lets_plot/plot/ggbunch_.py +96 -0
  62. lets_plot/plot/gggrid_.py +126 -0
  63. lets_plot/plot/ggtb_.py +55 -0
  64. lets_plot/plot/guide.py +229 -0
  65. lets_plot/plot/label.py +187 -0
  66. lets_plot/plot/marginal_layer.py +181 -0
  67. lets_plot/plot/plot.py +244 -0
  68. lets_plot/plot/pos.py +320 -0
  69. lets_plot/plot/sampling.py +338 -0
  70. lets_plot/plot/sandbox_.py +26 -0
  71. lets_plot/plot/scale.py +3577 -0
  72. lets_plot/plot/scale_colormap_mpl.py +297 -0
  73. lets_plot/plot/scale_convenience.py +155 -0
  74. lets_plot/plot/scale_identity_.py +658 -0
  75. lets_plot/plot/scale_position.py +1342 -0
  76. lets_plot/plot/series_meta.py +203 -0
  77. lets_plot/plot/stat.py +581 -0
  78. lets_plot/plot/subplots.py +322 -0
  79. lets_plot/plot/subplots_util.py +24 -0
  80. lets_plot/plot/theme_.py +772 -0
  81. lets_plot/plot/theme_set.py +393 -0
  82. lets_plot/plot/tooltip.py +486 -0
  83. lets_plot/plot/util.py +237 -0
  84. lets_plot/settings_utils.py +244 -0
  85. lets_plot/tilesets.py +429 -0
  86. lets_plot-4.7.0rc1.dist-info/METADATA +196 -0
  87. lets_plot-4.7.0rc1.dist-info/RECORD +95 -0
  88. lets_plot-4.7.0rc1.dist-info/WHEEL +6 -0
  89. lets_plot-4.7.0rc1.dist-info/licenses/LICENSE +21 -0
  90. lets_plot-4.7.0rc1.dist-info/licenses/licenses/LICENSE.FreeType +166 -0
  91. lets_plot-4.7.0rc1.dist-info/licenses/licenses/LICENSE.ImageMagick +106 -0
  92. lets_plot-4.7.0rc1.dist-info/licenses/licenses/LICENSE.expat +21 -0
  93. lets_plot-4.7.0rc1.dist-info/licenses/licenses/LICENSE.fontconfig +200 -0
  94. lets_plot-4.7.0rc1.dist-info/top_level.txt +2 -0
  95. lets_plot_kotlin_bridge.cpython-310-aarch64-linux-gnu.so +0 -0
@@ -0,0 +1,393 @@
1
+ #
2
+ # Copyright (c) 2019. JetBrains s.r.o.
3
+ # Use of this source code is governed by the MIT license that can be found in the LICENSE file.
4
+ #
5
+ from .core import FeatureSpec
6
+
7
+ __all__ = [
8
+ 'theme_grey',
9
+ 'theme_light',
10
+ 'theme_classic',
11
+ 'theme_minimal',
12
+ 'theme_minimal2',
13
+ 'theme_none',
14
+ 'theme_bw',
15
+ 'theme_void',
16
+ 'flavor_darcula',
17
+ 'flavor_solarized_light',
18
+ 'flavor_solarized_dark',
19
+ 'flavor_high_contrast_light',
20
+ 'flavor_high_contrast_dark'
21
+ ]
22
+
23
+
24
+ def theme_grey():
25
+ """
26
+ Grey background and white gridlines.
27
+
28
+ Returns
29
+ -------
30
+ `FeatureSpec`
31
+ Theme specification.
32
+
33
+ Examples
34
+ --------
35
+ .. jupyter-execute::
36
+ :linenos:
37
+ :emphasize-lines: 7
38
+
39
+ import numpy as np
40
+ from lets_plot import *
41
+ LetsPlot.setup_html()
42
+ np.random.seed(42)
43
+ data = {'x': np.random.normal(size=1000)}
44
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
45
+ theme_grey()
46
+
47
+ """
48
+ return FeatureSpec('theme', name="grey")
49
+
50
+
51
+ def theme_light():
52
+ """
53
+ Light grey lines of various widths on white background.
54
+
55
+ Returns
56
+ -------
57
+ `FeatureSpec`
58
+ Theme specification.
59
+
60
+ Examples
61
+ --------
62
+ .. jupyter-execute::
63
+ :linenos:
64
+ :emphasize-lines: 7
65
+
66
+ import numpy as np
67
+ from lets_plot import *
68
+ LetsPlot.setup_html()
69
+ np.random.seed(42)
70
+ data = {'x': np.random.normal(size=1000)}
71
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
72
+ theme_light()
73
+
74
+ """
75
+ return FeatureSpec('theme', name="light")
76
+
77
+
78
+ def theme_classic():
79
+ """
80
+ Dark grey axes and no gridlines.
81
+
82
+ Returns
83
+ -------
84
+ `FeatureSpec`
85
+ Theme specification.
86
+
87
+ Examples
88
+ --------
89
+ .. jupyter-execute::
90
+ :linenos:
91
+ :emphasize-lines: 7
92
+
93
+ import numpy as np
94
+ from lets_plot import *
95
+ LetsPlot.setup_html()
96
+ np.random.seed(42)
97
+ data = {'x': np.random.normal(size=1000)}
98
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
99
+ theme_classic()
100
+
101
+ """
102
+ return FeatureSpec('theme', name="classic")
103
+
104
+
105
+ def theme_minimal():
106
+ """
107
+ A minimalistic theme without axes lines.
108
+
109
+ Returns
110
+ -------
111
+ `FeatureSpec`
112
+ Theme specification.
113
+
114
+ Examples
115
+ --------
116
+ .. jupyter-execute::
117
+ :linenos:
118
+ :emphasize-lines: 7
119
+
120
+ import numpy as np
121
+ from lets_plot import *
122
+ LetsPlot.setup_html()
123
+ np.random.seed(42)
124
+ data = {'x': np.random.normal(size=1000)}
125
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
126
+ theme_minimal()
127
+
128
+ """
129
+ return FeatureSpec('theme', name="minimal")
130
+
131
+
132
+ def theme_minimal2():
133
+ """
134
+ Default theme similar to `theme_minimal()` but with x axis line and only major grid lines.
135
+
136
+ Returns
137
+ -------
138
+ `FeatureSpec`
139
+ Theme specification.
140
+
141
+ Examples
142
+ --------
143
+ .. jupyter-execute::
144
+ :linenos:
145
+ :emphasize-lines: 7
146
+
147
+ import numpy as np
148
+ from lets_plot import *
149
+ LetsPlot.setup_html()
150
+ np.random.seed(42)
151
+ data = {'x': np.random.normal(size=1000)}
152
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
153
+ theme_minimal2()
154
+
155
+ """
156
+ return FeatureSpec('theme', name="minimal2")
157
+
158
+
159
+ def theme_none():
160
+ """
161
+ Basic settings are applied.
162
+
163
+ Returns
164
+ -------
165
+ `FeatureSpec`
166
+ Theme specification.
167
+
168
+ Examples
169
+ --------
170
+ .. jupyter-execute::
171
+ :linenos:
172
+ :emphasize-lines: 7
173
+
174
+ import numpy as np
175
+ from lets_plot import *
176
+ LetsPlot.setup_html()
177
+ np.random.seed(42)
178
+ data = {'x': np.random.normal(size=1000)}
179
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
180
+ theme_none()
181
+
182
+ """
183
+ return FeatureSpec('theme', name="none")
184
+
185
+
186
+ def theme_bw():
187
+ """
188
+ Grey lines on white background with dark grey plot border.
189
+
190
+ Returns
191
+ -------
192
+ `FeatureSpec`
193
+ Theme specification.
194
+
195
+ Examples
196
+ --------
197
+ .. jupyter-execute::
198
+ :linenos:
199
+ :emphasize-lines: 7
200
+
201
+ import numpy as np
202
+ from lets_plot import *
203
+ LetsPlot.setup_html()
204
+ np.random.seed(42)
205
+ data = {'x': np.random.normal(size=1000)}
206
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
207
+ theme_bw()
208
+
209
+ """
210
+ return FeatureSpec('theme', name="bw")
211
+
212
+
213
+ def theme_void():
214
+ """
215
+ A completely blank (or "void") background theme: no borders, axes, or gridlines.
216
+
217
+ Returns
218
+ -------
219
+ `FeatureSpec`
220
+ Theme specification.
221
+
222
+ Examples
223
+ --------
224
+ .. jupyter-execute::
225
+ :linenos:
226
+ :emphasize-lines: 7
227
+
228
+ import numpy as np
229
+ from lets_plot import *
230
+ LetsPlot.setup_html()
231
+ np.random.seed(42)
232
+ data = {'x': np.random.normal(size=1000)}
233
+ ggplot(data, aes(x='x')) + geom_histogram() + \\
234
+ theme_void()
235
+
236
+ """
237
+ blank_elems = {'line': 'blank', 'axis': 'blank'}
238
+ return theme_classic() + FeatureSpec('theme', name=None, **blank_elems)
239
+
240
+
241
+ def flavor_darcula():
242
+ """
243
+ Darcula color scheme.
244
+
245
+ Returns
246
+ -------
247
+ `FeatureSpec`
248
+ Theme specification.
249
+
250
+ Examples
251
+ --------
252
+ .. jupyter-execute::
253
+ :linenos:
254
+ :emphasize-lines: 11
255
+
256
+ import numpy as np
257
+ from lets_plot import *
258
+ LetsPlot.setup_html()
259
+ data = {'name': ['pen', 'brush', 'paper'],
260
+ 'slice': [1, 3, 3]}
261
+ ggplot(data) + \\
262
+ geom_pie(aes(fill='name', slice='slice'),
263
+ stat='identity', color='pen',
264
+ tooltips='none', labels=layer_labels().line('@name')) + \\
265
+ scale_fill_manual(['pen', 'brush', 'paper']) + \\
266
+ flavor_darcula()
267
+
268
+ """
269
+ return FeatureSpec('theme', name=None, flavor="darcula")
270
+
271
+
272
+ def flavor_solarized_light():
273
+ """
274
+ Solarized light color scheme.
275
+
276
+ Returns
277
+ -------
278
+ `FeatureSpec`
279
+ Theme specification.
280
+
281
+ Examples
282
+ --------
283
+ .. jupyter-execute::
284
+ :linenos:
285
+ :emphasize-lines: 11
286
+
287
+ import numpy as np
288
+ from lets_plot import *
289
+ LetsPlot.setup_html()
290
+ data = {'name': ['pen', 'brush', 'paper'],
291
+ 'slice': [1, 3, 3]}
292
+ ggplot(data) + \\
293
+ geom_pie(aes(fill='name', slice='slice'),
294
+ stat='identity', color='pen',
295
+ tooltips='none', labels=layer_labels().line('@name')) + \\
296
+ scale_fill_manual(['pen', 'brush', 'paper']) + \\
297
+ flavor_solarized_light()
298
+
299
+ """
300
+ return FeatureSpec('theme', name=None, flavor="solarized_light")
301
+
302
+
303
+ def flavor_solarized_dark():
304
+ """
305
+ Solarized dark color scheme.
306
+
307
+ Returns
308
+ -------
309
+ `FeatureSpec`
310
+ Theme specification.
311
+
312
+ Examples
313
+ --------
314
+ .. jupyter-execute::
315
+ :linenos:
316
+ :emphasize-lines: 11
317
+
318
+ import numpy as np
319
+ from lets_plot import *
320
+ LetsPlot.setup_html()
321
+ data = {'name': ['pen', 'brush', 'paper'],
322
+ 'slice': [1, 3, 3]}
323
+ ggplot(data) + \\
324
+ geom_pie(aes(fill='name', slice='slice'),
325
+ stat='identity', color='pen',
326
+ tooltips='none', labels=layer_labels().line('@name')) + \\
327
+ scale_fill_manual(['pen', 'brush', 'paper']) + \\
328
+ flavor_solarized_dark()
329
+
330
+ """
331
+ return FeatureSpec('theme', name=None, flavor="solarized_dark")
332
+
333
+
334
+ def flavor_high_contrast_light():
335
+ """
336
+ High contrast light color scheme.
337
+
338
+ Returns
339
+ -------
340
+ `FeatureSpec`
341
+ Theme specification.
342
+
343
+ Examples
344
+ --------
345
+ .. jupyter-execute::
346
+ :linenos:
347
+ :emphasize-lines: 11
348
+
349
+ import numpy as np
350
+ from lets_plot import *
351
+ LetsPlot.setup_html()
352
+ data = {'name': ['pen', 'brush', 'paper'],
353
+ 'slice': [1, 3, 3]}
354
+ ggplot(data) + \\
355
+ geom_pie(aes(fill='name', slice='slice'),
356
+ stat='identity', color='pen',
357
+ tooltips='none', labels=layer_labels().line('@name')) + \\
358
+ scale_fill_manual(['pen', 'brush', 'paper']) + \\
359
+ flavor_high_contrast_light()
360
+
361
+ """
362
+ return FeatureSpec('theme', name=None, flavor="high_contrast_light")
363
+
364
+
365
+ def flavor_high_contrast_dark():
366
+ """
367
+ High contrast dark color scheme.
368
+
369
+ Returns
370
+ -------
371
+ `FeatureSpec`
372
+ Theme specification.
373
+
374
+ Examples
375
+ --------
376
+ .. jupyter-execute::
377
+ :linenos:
378
+ :emphasize-lines: 11
379
+
380
+ import numpy as np
381
+ from lets_plot import *
382
+ LetsPlot.setup_html()
383
+ data = {'name': ['pen', 'brush', 'paper'],
384
+ 'slice': [1, 3, 3]}
385
+ ggplot(data) + \\
386
+ geom_pie(aes(fill='name', slice='slice'),
387
+ stat='identity', color='pen',
388
+ tooltips='none', labels=layer_labels().line('@name')) + \\
389
+ scale_fill_manual(['pen', 'brush', 'paper']) + \\
390
+ flavor_high_contrast_dark()
391
+
392
+ """
393
+ return FeatureSpec('theme', name=None, flavor="high_contrast_dark")