lets-plot 4.8.1rc1__cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.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.
Files changed (97) hide show
  1. lets_plot/__init__.py +382 -0
  2. lets_plot/_global_settings.py +192 -0
  3. lets_plot/_kbridge.py +197 -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 +106 -0
  8. lets_plot/bistro/corr.py +448 -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 +332 -0
  14. lets_plot/export/__init__.py +6 -0
  15. lets_plot/export/ggsave_.py +172 -0
  16. lets_plot/frontend_context/__init__.py +8 -0
  17. lets_plot/frontend_context/_configuration.py +140 -0
  18. lets_plot/frontend_context/_dynamic_configure_html.py +115 -0
  19. lets_plot/frontend_context/_frontend_ctx.py +16 -0
  20. lets_plot/frontend_context/_html_contexts.py +223 -0
  21. lets_plot/frontend_context/_intellij_python_json_ctx.py +38 -0
  22. lets_plot/frontend_context/_isolated_webview_panel_ctx.py +81 -0
  23. lets_plot/frontend_context/_json_contexts.py +39 -0
  24. lets_plot/frontend_context/_jupyter_notebook_ctx.py +82 -0
  25. lets_plot/frontend_context/_mime_types.py +7 -0
  26. lets_plot/frontend_context/_static_html_page_ctx.py +76 -0
  27. lets_plot/frontend_context/_static_svg_ctx.py +26 -0
  28. lets_plot/frontend_context/_webbr_html_page_ctx.py +29 -0
  29. lets_plot/frontend_context/sandbox.py +5 -0
  30. lets_plot/geo_data/__init__.py +19 -0
  31. lets_plot/geo_data/core.py +335 -0
  32. lets_plot/geo_data/geocoder.py +988 -0
  33. lets_plot/geo_data/geocodes.py +512 -0
  34. lets_plot/geo_data/gis/__init__.py +0 -0
  35. lets_plot/geo_data/gis/fluent_dict.py +201 -0
  36. lets_plot/geo_data/gis/geocoding_service.py +42 -0
  37. lets_plot/geo_data/gis/geometry.py +91 -0
  38. lets_plot/geo_data/gis/json_request.py +232 -0
  39. lets_plot/geo_data/gis/json_response.py +308 -0
  40. lets_plot/geo_data/gis/request.py +492 -0
  41. lets_plot/geo_data/gis/response.py +247 -0
  42. lets_plot/geo_data/livemap_helper.py +65 -0
  43. lets_plot/geo_data/to_geo_data_frame.py +141 -0
  44. lets_plot/geo_data/type_assertion.py +34 -0
  45. lets_plot/geo_data_internals/__init__.py +4 -0
  46. lets_plot/geo_data_internals/constants.py +13 -0
  47. lets_plot/geo_data_internals/utils.py +33 -0
  48. lets_plot/mapping.py +115 -0
  49. lets_plot/package_data/lets-plot.min.js +3 -0
  50. lets_plot/plot/__init__.py +64 -0
  51. lets_plot/plot/_global_theme.py +14 -0
  52. lets_plot/plot/annotation.py +290 -0
  53. lets_plot/plot/coord.py +242 -0
  54. lets_plot/plot/core.py +1071 -0
  55. lets_plot/plot/expand_limits_.py +78 -0
  56. lets_plot/plot/facet.py +210 -0
  57. lets_plot/plot/font_features.py +71 -0
  58. lets_plot/plot/geom.py +9146 -0
  59. lets_plot/plot/geom_extras.py +53 -0
  60. lets_plot/plot/geom_function_.py +219 -0
  61. lets_plot/plot/geom_imshow_.py +393 -0
  62. lets_plot/plot/geom_livemap_.py +343 -0
  63. lets_plot/plot/ggbunch_.py +96 -0
  64. lets_plot/plot/gggrid_.py +139 -0
  65. lets_plot/plot/ggtb_.py +81 -0
  66. lets_plot/plot/guide.py +231 -0
  67. lets_plot/plot/label.py +187 -0
  68. lets_plot/plot/marginal_layer.py +181 -0
  69. lets_plot/plot/plot.py +245 -0
  70. lets_plot/plot/pos.py +344 -0
  71. lets_plot/plot/sampling.py +338 -0
  72. lets_plot/plot/sandbox_.py +26 -0
  73. lets_plot/plot/scale.py +3580 -0
  74. lets_plot/plot/scale_colormap_mpl.py +300 -0
  75. lets_plot/plot/scale_convenience.py +155 -0
  76. lets_plot/plot/scale_identity_.py +653 -0
  77. lets_plot/plot/scale_position.py +1342 -0
  78. lets_plot/plot/series_meta.py +209 -0
  79. lets_plot/plot/stat.py +585 -0
  80. lets_plot/plot/subplots.py +331 -0
  81. lets_plot/plot/subplots_util.py +24 -0
  82. lets_plot/plot/theme_.py +790 -0
  83. lets_plot/plot/theme_set.py +418 -0
  84. lets_plot/plot/tooltip.py +486 -0
  85. lets_plot/plot/util.py +267 -0
  86. lets_plot/settings_utils.py +244 -0
  87. lets_plot/tilesets.py +429 -0
  88. lets_plot-4.8.1rc1.dist-info/METADATA +221 -0
  89. lets_plot-4.8.1rc1.dist-info/RECORD +97 -0
  90. lets_plot-4.8.1rc1.dist-info/WHEEL +6 -0
  91. lets_plot-4.8.1rc1.dist-info/licenses/LICENSE +21 -0
  92. lets_plot-4.8.1rc1.dist-info/licenses/licenses/LICENSE.FreeType +166 -0
  93. lets_plot-4.8.1rc1.dist-info/licenses/licenses/LICENSE.ImageMagick +106 -0
  94. lets_plot-4.8.1rc1.dist-info/licenses/licenses/LICENSE.expat +21 -0
  95. lets_plot-4.8.1rc1.dist-info/licenses/licenses/LICENSE.fontconfig +200 -0
  96. lets_plot-4.8.1rc1.dist-info/top_level.txt +2 -0
  97. lets_plot_kotlin_bridge.cpython-311-x86_64-linux-gnu.so +0 -0
lets_plot/tilesets.py ADDED
@@ -0,0 +1,429 @@
1
+ # Copyright (c) 2021. JetBrains s.r.o.
2
+ # Use of this source code is governed by the MIT license that can be found in the LICENSE file.
3
+
4
+
5
+ from lets_plot import maptiles_lets_plot as _maptiles_lets_plot # to not polute scope with maptiles_lets_plot
6
+ from lets_plot import maptiles_solid as _maptiles_solid # to not polute scope with maptiles_solid
7
+ from lets_plot import maptiles_zxy as _maptiles_zxy # to not polute scope with maptiles_zxy
8
+
9
+ LETS_PLOT_COLOR = _maptiles_lets_plot(theme='color')
10
+ """
11
+ Default vector tiles.
12
+
13
+ Examples
14
+ --------
15
+ .. jupyter-execute::
16
+ :linenos:
17
+ :emphasize-lines: 4
18
+
19
+ from lets_plot import *
20
+ from lets_plot import tilesets
21
+ LetsPlot.setup_html()
22
+ ggplot() + geom_livemap(tiles=tilesets.LETS_PLOT_COLOR)
23
+
24
+ """
25
+
26
+ LETS_PLOT_LIGHT = _maptiles_lets_plot(theme='light')
27
+ """
28
+ Vector tiles, light theme.
29
+
30
+ Examples
31
+ --------
32
+ .. jupyter-execute::
33
+ :linenos:
34
+ :emphasize-lines: 4
35
+
36
+ from lets_plot import *
37
+ from lets_plot import tilesets
38
+ LetsPlot.setup_html()
39
+ ggplot() + geom_livemap(tiles=tilesets.LETS_PLOT_LIGHT)
40
+
41
+ """
42
+
43
+ LETS_PLOT_DARK = _maptiles_lets_plot(theme='dark')
44
+ """
45
+ Vector tiles, dark theme.
46
+
47
+ Examples
48
+ --------
49
+ .. jupyter-execute::
50
+ :linenos:
51
+ :emphasize-lines: 4
52
+
53
+ from lets_plot import *
54
+ from lets_plot import tilesets
55
+ LetsPlot.setup_html()
56
+ ggplot() + geom_livemap(tiles=tilesets.LETS_PLOT_DARK)
57
+
58
+ """
59
+
60
+ LETS_PLOT_BW = _maptiles_lets_plot(theme='bw')
61
+ """
62
+ Vector tiles, BW theme.
63
+
64
+ Examples
65
+ --------
66
+ .. jupyter-execute::
67
+ :linenos:
68
+ :emphasize-lines: 4
69
+
70
+ from lets_plot import *
71
+ from lets_plot import tilesets
72
+ LetsPlot.setup_html()
73
+ ggplot() + geom_livemap(tiles=tilesets.LETS_PLOT_BW)
74
+
75
+ """
76
+
77
+ SOLID = _maptiles_solid('#FFFFFF')
78
+ """
79
+ Blank tiles.
80
+ Show no other graphics but a solid background color.
81
+
82
+ Examples
83
+ --------
84
+ .. jupyter-execute::
85
+ :linenos:
86
+ :emphasize-lines: 4
87
+
88
+ from lets_plot import *
89
+ from lets_plot import tilesets
90
+ LetsPlot.setup_html()
91
+ ggplot() + geom_livemap(tiles=tilesets.SOLID)
92
+
93
+ """
94
+
95
+ OSM = _maptiles_zxy(
96
+ url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
97
+ attribution='map data: <a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>',
98
+ min_zoom=1, max_zoom=19, subdomains='abc'
99
+ )
100
+ """
101
+ OpenStreetMap's standard tile layer.
102
+
103
+ Examples
104
+ --------
105
+ .. jupyter-execute::
106
+ :linenos:
107
+ :emphasize-lines: 4
108
+
109
+ from lets_plot import *
110
+ from lets_plot import tilesets
111
+ LetsPlot.setup_html()
112
+ ggplot() + geom_livemap(tiles=tilesets.OSM)
113
+
114
+ """
115
+
116
+ OPEN_TOPO_MAP = _maptiles_zxy(
117
+ url="https://tile.opentopomap.org/{z}/{x}/{y}.png",
118
+ attribution='map data: <a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a>, <a href="http://viewfinderpanoramas.org/">SRTM</a> | map style: <a href="https://opentopomap.org/">© OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>) ',
119
+ min_zoom=1, max_zoom=16
120
+ )
121
+ """
122
+ OpenTopoMap's tile layer.
123
+
124
+ Examples
125
+ --------
126
+ .. jupyter-execute::
127
+ :linenos:
128
+ :emphasize-lines: 4
129
+
130
+ from lets_plot import *
131
+ from lets_plot import tilesets
132
+ LetsPlot.setup_html()
133
+ ggplot() + geom_livemap(tiles=tilesets.OPEN_TOPO_MAP)
134
+
135
+ """
136
+
137
+
138
+ def _carto_tiles(tileset, cdn):
139
+ def build_carto_tiles_config(hi_res=''):
140
+ if cdn == 'carto':
141
+ base_url = "https://{{s}}.basemaps.cartocdn.com/rastertiles/{tileset}/{{z}}/{{x}}/{{y}}{hi_res}.png"
142
+ elif cdn == 'fastly':
143
+ base_url = "https://cartocdn_{{s}}.global.ssl.fastly.net/{tileset}/{{z}}/{{x}}/{{y}}{hi_res}.png"
144
+ else:
145
+ raise ValueError("Unknown carto cdn: {}. Expected 'carto' or 'fastly'.".format(cdn))
146
+
147
+ return _maptiles_zxy(
148
+ base_url.format(tileset=tileset, hi_res=hi_res),
149
+ 'map data: <a href="https://www.openstreetmap.org/copyright">© OpenStreetMap contributors</a> <a href="https://carto.com/attributions#basemaps">© CARTO</a>, <a href="https://carto.com/attributions">© CARTO</a>',
150
+ min_zoom=1, max_zoom=20, subdomains='abc'
151
+ )
152
+
153
+ return build_carto_tiles_config(), build_carto_tiles_config(hi_res="@2x")
154
+
155
+
156
+ CARTO_POSITRON, CARTO_POSITRON_HIRES = _carto_tiles('light_all', cdn='carto')
157
+ """
158
+ CARTO tiles, positron theme.
159
+
160
+ Examples
161
+ --------
162
+ .. jupyter-execute::
163
+ :linenos:
164
+ :emphasize-lines: 4
165
+
166
+ from lets_plot import *
167
+ from lets_plot import tilesets
168
+ LetsPlot.setup_html()
169
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_POSITRON)
170
+
171
+ |
172
+
173
+ .. jupyter-execute::
174
+ :linenos:
175
+ :emphasize-lines: 4
176
+
177
+ from lets_plot import *
178
+ from lets_plot import tilesets
179
+ LetsPlot.setup_html()
180
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_POSITRON_HIRES)
181
+
182
+ """
183
+
184
+ CARTO_POSITRON_NO_LABELS, CARTO_POSITRON_NO_LABELS_HIRES = _carto_tiles('light_nolabels', cdn='carto')
185
+ """
186
+ CARTO tiles, positron (no labels) theme.
187
+
188
+ Examples
189
+ --------
190
+ .. jupyter-execute::
191
+ :linenos:
192
+ :emphasize-lines: 4
193
+
194
+ from lets_plot import *
195
+ from lets_plot import tilesets
196
+ LetsPlot.setup_html()
197
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_POSITRON_NO_LABELS)
198
+
199
+ |
200
+
201
+ .. jupyter-execute::
202
+ :linenos:
203
+ :emphasize-lines: 4
204
+
205
+ from lets_plot import *
206
+ from lets_plot import tilesets
207
+ LetsPlot.setup_html()
208
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_POSITRON_NO_LABELS_HIRES)
209
+
210
+ """
211
+
212
+ CARTO_DARK_MATTER_NO_LABELS, CARTO_DARK_MATTER_NO_LABELS_HIRES = _carto_tiles('dark_nolabels', cdn='carto')
213
+ """
214
+ CARTO tiles, dark matter (no labels) theme.
215
+
216
+ Examples
217
+ --------
218
+ .. jupyter-execute::
219
+ :linenos:
220
+ :emphasize-lines: 4
221
+
222
+ from lets_plot import *
223
+ from lets_plot import tilesets
224
+ LetsPlot.setup_html()
225
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_DARK_MATTER_NO_LABELS)
226
+
227
+ |
228
+
229
+ .. jupyter-execute::
230
+ :linenos:
231
+ :emphasize-lines: 4
232
+
233
+ from lets_plot import *
234
+ from lets_plot import tilesets
235
+ LetsPlot.setup_html()
236
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_DARK_MATTER_NO_LABELS_HIRES)
237
+
238
+ """
239
+
240
+ CARTO_VOYAGER, CARTO_VOYAGER_HIRES = _carto_tiles('voyager', cdn='carto')
241
+ """
242
+ CARTO tiles, voyager theme.
243
+
244
+ Examples
245
+ --------
246
+ .. jupyter-execute::
247
+ :linenos:
248
+ :emphasize-lines: 4
249
+
250
+ from lets_plot import *
251
+ from lets_plot import tilesets
252
+ LetsPlot.setup_html()
253
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_VOYAGER)
254
+
255
+ |
256
+
257
+ .. jupyter-execute::
258
+ :linenos:
259
+ :emphasize-lines: 4
260
+
261
+ from lets_plot import *
262
+ from lets_plot import tilesets
263
+ LetsPlot.setup_html()
264
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_VOYAGER_HIRES)
265
+
266
+ """
267
+
268
+ CARTO_MIDNIGHT_COMMANDER, CARTO_MIDNIGHT_COMMANDER_HIRES = _carto_tiles('base-midnight', cdn='fastly')
269
+ """
270
+ CARTO tiles, midnight commander theme.
271
+
272
+ Examples
273
+ --------
274
+ .. jupyter-execute::
275
+ :linenos:
276
+ :emphasize-lines: 4
277
+
278
+ from lets_plot import *
279
+ from lets_plot import tilesets
280
+ LetsPlot.setup_html()
281
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_MIDNIGHT_COMMANDER)
282
+
283
+ |
284
+
285
+ .. jupyter-execute::
286
+ :linenos:
287
+ :emphasize-lines: 4
288
+
289
+ from lets_plot import *
290
+ from lets_plot import tilesets
291
+ LetsPlot.setup_html()
292
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_MIDNIGHT_COMMANDER_HIRES)
293
+
294
+ """
295
+
296
+ CARTO_ANTIQUE, CARTO_ANTIQUE_HIRES = _carto_tiles('base-antique', cdn='fastly')
297
+ """
298
+ CARTO tiles, antique theme.
299
+
300
+ Examples
301
+ --------
302
+ .. jupyter-execute::
303
+ :linenos:
304
+ :emphasize-lines: 4
305
+
306
+ from lets_plot import *
307
+ from lets_plot import tilesets
308
+ LetsPlot.setup_html()
309
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_ANTIQUE)
310
+
311
+ |
312
+
313
+ .. jupyter-execute::
314
+ :linenos:
315
+ :emphasize-lines: 4
316
+
317
+ from lets_plot import *
318
+ from lets_plot import tilesets
319
+ LetsPlot.setup_html()
320
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_ANTIQUE_HIRES)
321
+
322
+ """
323
+
324
+ CARTO_FLAT_BLUE, CARTO_FLAT_BLUE_HIRES = _carto_tiles('base-flatblue', cdn='fastly')
325
+ """
326
+ CARTO tiles, flat blue theme.
327
+
328
+ Examples
329
+ --------
330
+ .. jupyter-execute::
331
+ :linenos:
332
+ :emphasize-lines: 4
333
+
334
+ from lets_plot import *
335
+ from lets_plot import tilesets
336
+ LetsPlot.setup_html()
337
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_FLAT_BLUE)
338
+
339
+ |
340
+
341
+ .. jupyter-execute::
342
+ :linenos:
343
+ :emphasize-lines: 4
344
+
345
+ from lets_plot import *
346
+ from lets_plot import tilesets
347
+ LetsPlot.setup_html()
348
+ ggplot() + geom_livemap(tiles=tilesets.CARTO_FLAT_BLUE_HIRES)
349
+
350
+ """
351
+
352
+
353
+ def _nasa_tiles(tileset, max_zoom, time=''):
354
+ # https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers
355
+ return _maptiles_zxy(
356
+ url="https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/{tileset}/default/{time}/GoogleMapsCompatible_Level{max_zoom}/{{z}}/{{y}}/{{x}}.jpg" \
357
+ .format(tileset=tileset, time=time, max_zoom=max_zoom),
358
+ attribution='map data: <a href="https://earthdata.nasa.gov/eosdis/science-system-description/eosdis-components/gibs">© NASA Global Imagery Browse Services (GIBS)</a>',
359
+ min_zoom=1, max_zoom=max_zoom
360
+ )
361
+
362
+
363
+ NASA_CITYLIGHTS_2012 = _nasa_tiles('VIIRS_CityLights_2012', max_zoom=8)
364
+ """
365
+ NASA tiles, CityLights 2012 theme.
366
+
367
+ Examples
368
+ --------
369
+ .. jupyter-execute::
370
+ :linenos:
371
+ :emphasize-lines: 4
372
+
373
+ from lets_plot import *
374
+ from lets_plot import tilesets
375
+ LetsPlot.setup_html()
376
+ ggplot() + geom_livemap(tiles=tilesets.NASA_CITYLIGHTS_2012)
377
+
378
+ """
379
+
380
+ NASA_GREYSCALE_SHADED_RELIEF_30M = _nasa_tiles('ASTER_GDEM_Greyscale_Shaded_Relief', max_zoom=12)
381
+ """
382
+ NASA tiles, greyscale shaded relief (30m) theme.
383
+
384
+ Examples
385
+ --------
386
+ .. jupyter-execute::
387
+ :linenos:
388
+ :emphasize-lines: 4
389
+
390
+ from lets_plot import *
391
+ from lets_plot import tilesets
392
+ LetsPlot.setup_html()
393
+ ggplot() + geom_livemap(tiles=tilesets.NASA_GREYSCALE_SHADED_RELIEF_30M)
394
+
395
+ """
396
+
397
+ NASA_COLOR_SHADED_RELIEF_30M = _nasa_tiles('ASTER_GDEM_Color_Shaded_Relief', max_zoom=12)
398
+ """
399
+ NASA tiles, color shaded relief (30m) theme.
400
+
401
+ Examples
402
+ --------
403
+ .. jupyter-execute::
404
+ :linenos:
405
+ :emphasize-lines: 4
406
+
407
+ from lets_plot import *
408
+ from lets_plot import tilesets
409
+ LetsPlot.setup_html()
410
+ ggplot() + geom_livemap(tiles=tilesets.NASA_COLOR_SHADED_RELIEF_30M)
411
+
412
+ """
413
+
414
+ NASA_TERRA_TRUECOLOR = _nasa_tiles('MODIS_Terra_CorrectedReflectance_TrueColor', max_zoom=9, time='2015-06-07')
415
+ """
416
+ NASA tiles, Terra TrueColor theme.
417
+
418
+ Examples
419
+ --------
420
+ .. jupyter-execute::
421
+ :linenos:
422
+ :emphasize-lines: 4
423
+
424
+ from lets_plot import *
425
+ from lets_plot import tilesets
426
+ LetsPlot.setup_html()
427
+ ggplot() + geom_livemap(tiles=tilesets.NASA_TERRA_TRUECOLOR)
428
+
429
+ """
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.4
2
+ Name: lets-plot
3
+ Version: 4.8.1rc1
4
+ Summary: An open source library for statistical plotting
5
+ Home-page: https://lets-plot.org
6
+ Author: JetBrains
7
+ Author-email: lets-plot@jetbrains.com
8
+ Maintainer: JetBrains
9
+ Maintainer-email: lets-plot@jetbrains.com
10
+ License: MIT
11
+ Project-URL: Github, https://github.com/JetBrains/lets-plot
12
+ Project-URL: Documentation, https://lets-plot.org
13
+ Keywords: ggplot,ggplot2,geospatial,geopandas,geocoding
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Framework :: IPython
21
+ Classifier: Framework :: Jupyter
22
+ Classifier: Operating System :: MacOS
23
+ Classifier: Operating System :: POSIX :: Linux
24
+ Classifier: Operating System :: Microsoft :: Windows
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Topic :: Scientific/Engineering :: Visualization
27
+ Classifier: Intended Audience :: Science/Research
28
+ Classifier: Intended Audience :: Developers
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ License-File: licenses/LICENSE.FreeType
32
+ License-File: licenses/LICENSE.ImageMagick
33
+ License-File: licenses/LICENSE.expat
34
+ License-File: licenses/LICENSE.fontconfig
35
+ Requires-Dist: pypng
36
+ Requires-Dist: palettable
37
+ Requires-Dist: pillow
38
+ Dynamic: author
39
+ Dynamic: author-email
40
+ Dynamic: classifier
41
+ Dynamic: description
42
+ Dynamic: description-content-type
43
+ Dynamic: home-page
44
+ Dynamic: keywords
45
+ Dynamic: license
46
+ Dynamic: license-file
47
+ Dynamic: maintainer
48
+ Dynamic: maintainer-email
49
+ Dynamic: project-url
50
+ Dynamic: requires-dist
51
+ Dynamic: summary
52
+
53
+ # Lets-Plot
54
+
55
+ [![official JetBrains project](http://jb.gg/badges/official-flat-square.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
56
+ [![License MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/LICENSE)
57
+ [![Latest Release](https://img.shields.io/github/v/release/JetBrains/lets-plot)](https://github.com/JetBrains/lets-plot/releases/latest)
58
+
59
+
60
+ **Lets-Plot** is a multiplatform plotting library built on the principles of the Grammar of Graphics.
61
+
62
+ The library design is heavily influenced by Leland Wilkinson's work [The Grammar of Graphics](https://www.goodreads.com/book/show/2549408.The_Grammar_of_Graphics) describing the deep features that underlie all statistical graphics.
63
+
64
+ > This grammar [...] is made up of a set of independent components that can be composed in many different ways. This makes [it] very powerful because you are not limited to a set of pre-specified graphics, but you can create new graphics that are precisely tailored for your problem.
65
+ > - Hadley Wickham, "[ggplot2: Elegant Graphics for Data Analysis](https://ggplot2-book.org/index.html)"
66
+
67
+
68
+ ## Grammar of Graphics for Python [![Latest Release](https://badge.fury.io/py/lets-plot.svg)](https://pypi.org/project/lets-plot)
69
+
70
+ A bridge between R (ggplot2) and Python data visualization. \
71
+ To learn more, see the documentation site at **[lets-plot.org/python](https://lets-plot.org/python)**.
72
+
73
+
74
+ ## Grammar of Graphics for Kotlin [![Latest Release](https://img.shields.io/github/v/release/JetBrains/lets-plot-kotlin)](https://github.com/JetBrains/lets-plot-kotlin/releases/latest)
75
+
76
+ ### Notebooks
77
+ Create plots in [Kotlin Notebook](https://plugins.jetbrains.com/plugin/16340-kotlin-notebook),
78
+ [Datalore](https://datalore.jetbrains.com/report/static/HZqq77cegYd.E7get_WnChZ/aTA9lQnPkRwdCzT6uy95GZ), [Jupyter with Kotlin Kernel](https://github.com/Kotlin/kotlin-jupyter#readme) \
79
+ or any other notebook that supports `Kotlin Kernel`. \
80
+ To learn more, see the **[Lets-Plot Kotlin API](https://github.com/JetBrains/lets-plot-kotlin)** project at GitHub.
81
+
82
+ ### Compose Multiplatform
83
+ Embed Lets-Plot charts in [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform) applications. \
84
+ To learn more, see the **[Lets-Plot Compose Frontend](https://github.com/JetBrains/lets-plot-compose)** project at GitHub.
85
+
86
+ ### JVM and Kotlin/JS
87
+ Embed Lets-Plot charts in JVM (Swing, JavaFX) and Kotlin/JS applications. <br>
88
+ To learn more, see the **[Lets-Plot Kotlin API](https://github.com/JetBrains/lets-plot-kotlin)** project at GitHub.
89
+
90
+ ### Documentation
91
+
92
+ Kotlin API documentation site: [lets-plot.org/kotlin](https://lets-plot.org/kotlin).
93
+
94
+ ## "Lets-Plot in SciView" plugin
95
+
96
+ [![JetBrains Plugins](https://img.shields.io/jetbrains/plugin/v/14379-lets-plot-in-sciview.svg)](http://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview)
97
+ [![JetBrains plugins](https://img.shields.io/jetbrains/plugin/d/14379-lets-plot-in-sciview.svg)](http://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview)
98
+
99
+ *Scientific mode* in PyCharm and in IntelliJ IDEA provides support for interactive scientific computing and data visualization.
100
+
101
+ [*Lets-Plot in SciView*](https://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview) plugin adds
102
+ support for interactive plotting to IntelliJ-based IDEs with the *Scientific mode* enabled.
103
+
104
+ >
105
+ > **Note:** The *Scientific mode* is NOT available in communinty editions of JetBrains IDEs.
106
+ >
107
+
108
+ Also read:
109
+
110
+ - [Scientific mode in PyCharm](https://www.jetbrains.com/help/pycharm/matplotlib-support.html)
111
+ - [Scientific mode in IntelliJ IDEA](https://www.jetbrains.com/help/idea/matplotlib-support.html)
112
+
113
+ ## What is new in 4.8.0
114
+
115
+ - #### `geom_pointdensity()` Geometry
116
+
117
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25e/images/geom_pointdensity.png" alt="f-25e/images/geom_pointdensity.png" width="400" height="246">
118
+
119
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/geom_pointdensity.html).
120
+
121
+ - #### Explicit `group` aesthetic now overrides default grouping behavior instead of combining with it
122
+
123
+ > [!IMPORTANT]
124
+ > **BREAKING CHANGE:**
125
+ >
126
+ > Previously, setting `group='variable'` would group by both the explicit variable AND any discrete
127
+ > aesthetics (color, shape, etc.). \
128
+ > Now it groups ONLY by the explicit variable, matching `ggplot2` behavior. \
129
+ > Use `group=[var1, var2, ...]` to group by multiple variables explicitly, \
130
+ > and `group=[]` to disable any grouping.
131
+
132
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25e/images/group_override_defaults.png" alt="f-25e/images/group_override_defaults.png" width="400" height="263">
133
+
134
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/group_override_defaults.html).
135
+
136
+ - #### `gggrid()`: support for shared legends (parameter `guides`)
137
+
138
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25e/images/gggrid_legend_collect.png" alt="f-25e/images/group_override_defaults.png" width="500" height="172">
139
+
140
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/gggrid_legend_collect.html).
141
+
142
+ - #### Better handling of missing values in `geom_line(), geom_path(), geom_ribbon()`, and `geom_area()`
143
+
144
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25e/images/missing_values_ribbon.png" alt="f-25e/images/missing_values_ribbon.png" width="500" height="192">
145
+
146
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/missing_values_line_path_area_ribbon.html).
147
+
148
+ - #### `geom_histogram()`: custom bin bounds (parameter `breaks`)
149
+
150
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/geom_histogram_param_breaks.html).
151
+
152
+ - #### Legend automatically wraps to prevent overlap — up to 15 rows for vertical legends and 5 columns for horizontal ones
153
+
154
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/legend_wrap.html).
155
+
156
+ - #### `flavor_standard()` resets the theme's default color scheme
157
+ Use to override other flavors or make defaults explicit.
158
+
159
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/flavor_standard.html).
160
+
161
+ - #### `'left'`, `'right'`, `'top'`, and `'bottom'` legend justification
162
+
163
+ See [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/legend_justification.html).
164
+
165
+ - #### `ggtb()`: Added `size_zoomin` and `size_basis` parameters to control point size scaling behavior when zooming (works with `geom_point` and related layers).
166
+
167
+ See: [example notebook](https://raw.githack.com/JetBrains/lets-plot/master/docs/f-25e/ggtb_size_zoomin.html).
168
+
169
+
170
+ - #### And More
171
+
172
+ See [CHANGELOG.md](https://github.com/JetBrains/lets-plot/blob/master/CHANGELOG.md) for a full list of changes.
173
+
174
+
175
+ ## Recent Updates in the [Gallery](https://lets-plot.org/python/pages/gallery.html)
176
+
177
+ <a href="https://lets-plot.org/examples/demo/cities_density.html">
178
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/bcc63703214b5b02a8a374668d8bba7a451a9152/source/_static/images/changelog/4.8.0/square-cities_density.png?raw=true" alt="images/changelog/4.8.0/square-cities_density.png" width="128" height="128">
179
+ </a>
180
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/raincloud.ipynb">
181
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/41d87786905efdd5995f66e6a2734255548f00dc/source/_static/images/changelog/4.7.0/square-raincloud.png?raw=true" alt="images/changelog/4.7.0/square-raincloud.png" width="128" height="128">
182
+ </a>
183
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/europe_capitals.ipynb">
184
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/41d87786905efdd5995f66e6a2734255548f00dc/source/_static/images/changelog/4.7.0/square-europe_capitals.png?raw=true" alt="images/changelog/4.7.0/square-europe_capitals.png" width="128" height="128">
185
+ </a>
186
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/trading_chart.ipynb">
187
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/41d87786905efdd5995f66e6a2734255548f00dc/source/_static/images/changelog/4.7.0/square-trading_chart.png?raw=true" alt="images/changelog/4.7.0/square-trading_chart.png" width="128" height="128">
188
+ </a>
189
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/magnifier_inset.ipynb">
190
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/magnifier_inset.png" alt="f-25a/images/magnifier_inset.png" width="128" height="128">
191
+ </a>
192
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/ggbunch_indonesia.ipynb">
193
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-25a/images/ggbunch_indonesia.png" alt="f-25a/images/ggbunch_indonesia.png" width="128" height="128">
194
+ </a>
195
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/lets_plot_in_2024.ipynb">
196
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/41d87786905efdd5995f66e6a2734255548f00dc/source/_static/images/changelog/4.7.0/square-lets_plot_in_2024.png?raw=true" alt="images/changelog/4.7.0/square-lets_plot_in_2024.png" width="128" height="128">
197
+ </a>
198
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/plot_layout_scheme.ipynb">
199
+ <img src="https://github.com/JetBrains/lets-plot-docs/blob/41d87786905efdd5995f66e6a2734255548f00dc/source/_static/images/changelog/4.7.0/square-plot_layout_scheme.png?raw=true" alt="images/changelog/4.7.0/square-plot_layout_scheme.png" width="128" height="128">
200
+ </a>
201
+ <a href="https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/demo/theme_legend_scheme.ipynb">
202
+ <img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/f-24g/images/theme_legend_scheme.png" alt="f-24g/images/theme_legend_scheme.png" width="128" height="128">
203
+ </a>
204
+
205
+
206
+ ## Change Log
207
+
208
+ [CHANGELOG.md](https://github.com/JetBrains/lets-plot/blob/master/CHANGELOG.md)
209
+
210
+
211
+ ## Code of Conduct
212
+
213
+ This project and the corresponding community are governed by the
214
+ [JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct).
215
+ Please make sure you read it.
216
+
217
+
218
+ ## License
219
+
220
+ Code and documentation released under the [MIT license](https://github.com/JetBrains/lets-plot/blob/master/LICENSE).
221
+ Copyright © 2019-2025, JetBrains s.r.o.