lets-plot 4.7.0rc2__cp310-cp310-macosx_11_0_arm64.whl → 4.7.1rc1__cp310-cp310-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.

Files changed (61) hide show
  1. lets_plot/__init__.py +14 -14
  2. lets_plot/_global_settings.py +0 -4
  3. lets_plot/_kbridge.py +11 -3
  4. lets_plot/_version.py +1 -1
  5. lets_plot/bistro/corr.py +28 -27
  6. lets_plot/bistro/im.py +4 -4
  7. lets_plot/bistro/joint.py +7 -7
  8. lets_plot/bistro/qq.py +16 -16
  9. lets_plot/bistro/residual.py +10 -10
  10. lets_plot/bistro/waterfall.py +26 -27
  11. lets_plot/export/ggsave_.py +29 -17
  12. lets_plot/frontend_context/_configuration.py +2 -2
  13. lets_plot/frontend_context/_html_contexts.py +6 -6
  14. lets_plot/geo_data/core.py +26 -22
  15. lets_plot/geo_data/geocoder.py +67 -56
  16. lets_plot/mapping.py +3 -3
  17. lets_plot/package_data/lets-plot.min.js +1 -1
  18. lets_plot/plot/annotation.py +5 -5
  19. lets_plot/plot/coord.py +4 -4
  20. lets_plot/plot/core.py +77 -141
  21. lets_plot/plot/expand_limits_.py +2 -2
  22. lets_plot/plot/facet.py +21 -17
  23. lets_plot/plot/font_features.py +3 -3
  24. lets_plot/plot/geom.py +1129 -1103
  25. lets_plot/plot/geom_extras.py +1 -1
  26. lets_plot/plot/geom_function_.py +16 -13
  27. lets_plot/plot/geom_imshow_.py +8 -7
  28. lets_plot/plot/geom_livemap_.py +38 -13
  29. lets_plot/plot/ggbunch_.py +1 -1
  30. lets_plot/plot/gggrid_.py +3 -3
  31. lets_plot/plot/ggtb_.py +1 -1
  32. lets_plot/plot/guide.py +9 -7
  33. lets_plot/plot/label.py +9 -9
  34. lets_plot/plot/marginal_layer.py +4 -4
  35. lets_plot/plot/plot.py +17 -16
  36. lets_plot/plot/pos.py +15 -15
  37. lets_plot/plot/sampling.py +8 -8
  38. lets_plot/plot/scale.py +153 -150
  39. lets_plot/plot/scale_colormap_mpl.py +9 -6
  40. lets_plot/plot/scale_convenience.py +6 -6
  41. lets_plot/plot/scale_identity_.py +9 -9
  42. lets_plot/plot/scale_position.py +16 -16
  43. lets_plot/plot/series_meta.py +7 -1
  44. lets_plot/plot/stat.py +64 -60
  45. lets_plot/plot/subplots.py +31 -22
  46. lets_plot/plot/theme_.py +93 -92
  47. lets_plot/plot/theme_set.py +15 -14
  48. lets_plot/plot/tooltip.py +14 -14
  49. lets_plot/plot/util.py +33 -3
  50. lets_plot/settings_utils.py +12 -12
  51. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/METADATA +63 -43
  52. lets_plot-4.7.1rc1.dist-info/RECORD +95 -0
  53. lets_plot_kotlin_bridge.cpython-310-darwin.so +0 -0
  54. lets_plot-4.7.0rc2.dist-info/RECORD +0 -95
  55. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/WHEEL +0 -0
  56. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/licenses/LICENSE +0 -0
  57. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/licenses/licenses/LICENSE.FreeType +0 -0
  58. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/licenses/licenses/LICENSE.ImageMagick +0 -0
  59. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/licenses/licenses/LICENSE.expat +0 -0
  60. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/licenses/licenses/LICENSE.fontconfig +0 -0
  61. {lets_plot-4.7.0rc2.dist-info → lets_plot-4.7.1rc1.dist-info}/top_level.txt +0 -0
@@ -175,8 +175,12 @@ class Geocoder:
175
175
  Do not use this class explicitly.
176
176
 
177
177
  Instead you should construct its objects with special functions:
178
- `geocode()`, `geocode_cities()`, `geocode_counties()`, `geocode_states()`,
179
- `geocode_countries()`, `reverse_geocode()`.
178
+ `geocode() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode.html>`__,
179
+ `geocode_cities() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_cities.html>`__,
180
+ `geocode_counties() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_counties.html>`__,
181
+ `geocode_states() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_states.html>`__,
182
+ `geocode_countries() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_countries.html>`__,
183
+ ``reverse_geocode()``.
180
184
  """
181
185
 
182
186
  def __init__(self):
@@ -186,13 +190,13 @@ class Geocoder:
186
190
 
187
191
  def get_limits(self) -> 'GeoDataFrame':
188
192
  """
189
- Return bboxes (Polygon geometry) for given regions in form of `GeoDataFrame`.
193
+ Return bboxes (Polygon geometry) for given regions in form of ``GeoDataFrame``.
190
194
  For regions intersecting anti-meridian bbox will be divided into two parts
191
195
  and stored as two rows.
192
196
 
193
197
  Returns
194
198
  -------
195
- `GeoDataFrame`
199
+ ``GeoDataFrame``
196
200
  Table of data.
197
201
 
198
202
  Examples
@@ -214,11 +218,11 @@ class Geocoder:
214
218
 
215
219
  def get_centroids(self) -> 'GeoDataFrame':
216
220
  """
217
- Return centroids (Point geometry) for given regions in form of `GeoDataFrame`.
221
+ Return centroids (Point geometry) for given regions in form of ``GeoDataFrame``.
218
222
 
219
223
  Returns
220
224
  -------
221
- `GeoDataFrame`
225
+ ``GeoDataFrame``
222
226
  Table of data.
223
227
 
224
228
  Examples
@@ -240,7 +244,7 @@ class Geocoder:
240
244
 
241
245
  def get_boundaries(self, resolution=None) -> 'GeoDataFrame':
242
246
  """
243
- Return boundaries for given regions in the form of `GeoDataFrame`.
247
+ Return boundaries for given regions in the form of ``GeoDataFrame``.
244
248
 
245
249
  Parameters
246
250
  ----------
@@ -249,12 +253,12 @@ class Geocoder:
249
253
 
250
254
  Returns
251
255
  -------
252
- `GeoDataFrame`
256
+ ``GeoDataFrame``
253
257
  Table of data.
254
258
 
255
259
  Notes
256
260
  -----
257
- If `resolution` has int type, it may take one of the following values:
261
+ If ``resolution`` has int type, it may take one of the following values:
258
262
 
259
263
  - 1-3 for world scale view,
260
264
  - 4-6 for country scale view,
@@ -264,7 +268,7 @@ class Geocoder:
264
268
 
265
269
  Here value 1 corresponds to maximum performance and 15 - to maximum quality.
266
270
 
267
- If `resolution` is of str type, it may take one of the following values:
271
+ If ``resolution`` is of str type, it may take one of the following values:
268
272
 
269
273
  - 'world' corresponds to int value 2,
270
274
  - 'country' corresponds to int value 5,
@@ -282,18 +286,18 @@ class Geocoder:
282
286
  For example, 'city' scale can be used for a state to get a more detailed boundary
283
287
  when zooming in, or 'world' for a small preview.
284
288
 
285
- If `resolution` is not specified (or equal to None), it will be auto-detected.
289
+ If ``resolution`` is not specified (or equal to None), it will be auto-detected.
286
290
  Auto-detection by level_kind is used for geocoding and the number of objects.
287
291
  In this case performance is preferred over quality.
288
292
  The pixelated geometries can be obtained.
289
- Use explicit resolution or `inc_res()` function for better quality.
293
+ Use explicit resolution or ``inc_res()`` function for better quality.
290
294
 
291
- If the number of objects is equal to n, then `resolution` will be the following:
295
+ If the number of objects is equal to n, then ``resolution`` will be the following:
292
296
 
293
- - For countries: if n < 3 then `resolution=3`, else `resolution=1`.
294
- - For states: if n < 3 then `resolution=7`, if n < 10 then `resolution=4`, else `resolution=2`.
295
- - For counties: if n < 5 then `resolution=10`, if n < 20 then `resolution=8`, else `resolution=3`.
296
- - For cities: if n < 5 then `resolution=13`, if n < 50 then `resolution=4`, else `resolution=3`.
297
+ - For countries: if n < 3 then ``resolution=3``, else ``resolution=1``.
298
+ - For states: if n < 3 then ``resolution=7``, if n < 10 then ``resolution=4``, else ``resolution=2``.
299
+ - For counties: if n < 5 then ``resolution=10``, if n < 20 then ``resolution=8``, else ``resolution=3``.
300
+ - For cities: if n < 5 then ``resolution=13``, if n < 50 then ``resolution=4``, else ``resolution=3``.
297
301
 
298
302
  Examples
299
303
  --------
@@ -318,7 +322,7 @@ class Geocoder:
318
322
 
319
323
  Returns
320
324
  -------
321
- `DataFrame`
325
+ ``DataFrame``
322
326
  Table of data.
323
327
 
324
328
  Examples
@@ -344,7 +348,7 @@ class Geocoder:
344
348
 
345
349
  Returns
346
350
  -------
347
- `Geocoder`
351
+ ``Geocoder``
348
352
  Geocoder object specification.
349
353
 
350
354
  Examples
@@ -392,8 +396,12 @@ class ReverseGeocoder(Geocoder):
392
396
  Do not use this class explicitly.
393
397
 
394
398
  Instead you should construct its objects with special functions:
395
- `geocode()`, `geocode_cities()`, `geocode_counties()`, `geocode_states()`,
396
- `geocode_countries()`, `reverse_geocode()`.
399
+ `geocode() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode.html>`__,
400
+ `geocode_cities() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_cities.html>`__,
401
+ `geocode_counties() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_counties.html>`__,
402
+ `geocode_states() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_states.html>`__,
403
+ `geocode_countries() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_countries.html>`__,
404
+ ``reverse_geocode()``.
397
405
  """
398
406
 
399
407
  def __init__(self, lon, lat, level: Optional[Union[str, LevelKind]], scope=None):
@@ -430,8 +438,11 @@ class NamesGeocoder(Geocoder):
430
438
  Do not use this class explicitly.
431
439
 
432
440
  Instead you should construct its objects with special functions:
433
- `geocode()`, `geocode_cities()`, `geocode_counties()`, `geocode_states()`,
434
- `geocode_countries()`, `reverse_geocode()`.
441
+ `geocode() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode.html>`__,
442
+ `geocode_cities() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_cities.html>`__,
443
+ `geocode_counties() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_counties.html>`__,
444
+ `geocode_states() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_states.html>`__,
445
+ `geocode_countries() <https://lets-plot.org/python/pages/api/lets_plot.geo_data.geocode_countries.html>`__.
435
446
  """
436
447
 
437
448
  def __init__(
@@ -466,14 +477,14 @@ class NamesGeocoder(Geocoder):
466
477
 
467
478
  Parameters
468
479
  ----------
469
- scope : str or `Geocoder`
480
+ scope : str or ``Geocoder``
470
481
  Area of interest.
471
482
  If it is of str type then it should be the geo-object name.
472
- If it is of `Geocoder` type then it must contain only one object.
483
+ If it is of ``Geocoder`` type then it must contain only one object.
473
484
 
474
485
  Returns
475
486
  -------
476
- `NamesGeocoder`
487
+ ``NamesGeocoder``
477
488
  Geocoder object specification.
478
489
 
479
490
  Examples
@@ -498,17 +509,17 @@ class NamesGeocoder(Geocoder):
498
509
 
499
510
  def highlights(self, v: bool):
500
511
  """
501
- Add matched string to geocodes `DataFrame`. Doesn't affect `GeoDataFrame`.
512
+ Add matched string to geocodes ``DataFrame``. Doesn't affect ``GeoDataFrame``.
502
513
 
503
514
  Parameters
504
515
  ----------
505
516
  v : bool
506
- If True geocodes `DataFrame` will contain column 'highlights'
517
+ If True geocodes ``DataFrame`` will contain column 'highlights'
507
518
  with string that matched the name.
508
519
 
509
520
  Returns
510
521
  -------
511
- `NamesGeocoder`
522
+ ``NamesGeocoder``
512
523
  Geocoder object specification.
513
524
 
514
525
  Examples
@@ -531,17 +542,17 @@ class NamesGeocoder(Geocoder):
531
542
 
532
543
  Parameters
533
544
  ----------
534
- countries : str or `Geocoder` or list
545
+ countries : str or ``Geocoder`` or list
535
546
  Parents for 'country' level.
536
547
  If it is of str type then it should be the country name.
537
- If it is of `Geocoder` type then it must contain the same number
538
- of values as the number of names of `Geocoder`.
548
+ If it is of ``Geocoder`` type then it must contain the same number
549
+ of values as the number of names of ``Geocoder``.
539
550
  If it is of list type then it must be the same size
540
- as the number of names of `Geocoder`.
551
+ as the number of names of ``Geocoder``.
541
552
 
542
553
  Returns
543
554
  -------
544
- `NamesGeocoder`
555
+ ``NamesGeocoder``
545
556
  Geocoder object specification.
546
557
 
547
558
  Examples
@@ -570,17 +581,17 @@ class NamesGeocoder(Geocoder):
570
581
 
571
582
  Parameters
572
583
  ----------
573
- states : str or `Geocoder` or list
584
+ states : str or ``Geocoder`` or list
574
585
  Parents for 'state' level.
575
586
  If it is of str type then it should be the state name.
576
- If it is of `Geocoder` type then it must contain the same number
577
- of values as the number of names of `Geocoder`.
587
+ If it is of ``Geocoder`` type then it must contain the same number
588
+ of values as the number of names of ``Geocoder``.
578
589
  If it is of list type then it must be the same size
579
- as the number of names of `Geocoder`.
590
+ as the number of names of ``Geocoder``.
580
591
 
581
592
  Returns
582
593
  -------
583
- `NamesGeocoder`
594
+ ``NamesGeocoder``
584
595
  Geocoder object specification.
585
596
 
586
597
  Examples
@@ -610,17 +621,17 @@ class NamesGeocoder(Geocoder):
610
621
 
611
622
  Parameters
612
623
  ----------
613
- counties : str or `Geocoder` or list
624
+ counties : str or ``Geocoder`` or list
614
625
  Parents for 'county' level.
615
626
  If it is of str type then it should be the county name.
616
- If it is of `Geocoder` type then it must contain the same number
617
- of values as the number of names of `Geocoder`.
627
+ If it is of ``Geocoder`` type then it must contain the same number
628
+ of values as the number of names of ``Geocoder``.
618
629
  If it is of list type then it must be the same size
619
- as the number of names of `Geocoder`.
630
+ as the number of names of ``Geocoder``.
620
631
 
621
632
  Returns
622
633
  -------
623
- `NamesGeocoder`
634
+ ``NamesGeocoder``
624
635
  Geocoder object specification.
625
636
 
626
637
  Examples
@@ -650,7 +661,7 @@ class NamesGeocoder(Geocoder):
650
661
 
651
662
  Returns
652
663
  -------
653
- `NamesGeocoder`
664
+ ``NamesGeocoder``
654
665
  Geocoder object specification.
655
666
 
656
667
  Examples
@@ -679,7 +690,7 @@ class NamesGeocoder(Geocoder):
679
690
 
680
691
  Returns
681
692
  -------
682
- `NamesGeocoder`
693
+ ``NamesGeocoder``
683
694
  Geocoder object specification.
684
695
 
685
696
  Examples
@@ -708,7 +719,7 @@ class NamesGeocoder(Geocoder):
708
719
 
709
720
  Returns
710
721
  -------
711
- `NamesGeocoder`
722
+ ``NamesGeocoder``
712
723
  Geocoder object specification.
713
724
 
714
725
  Examples
@@ -747,26 +758,26 @@ class NamesGeocoder(Geocoder):
747
758
  Parameters
748
759
  ----------
749
760
  name : str
750
- Name in `Geocoder` that needs better qualification.
761
+ Name in ``Geocoder`` that needs better qualification.
751
762
  county : str
752
- If `Geocoder` has parent counties this field must be present to identify a row for the name.
763
+ If ``Geocoder`` has parent counties this field must be present to identify a row for the name.
753
764
  state : str
754
- If `Geocoder` has parent states this field must be present to identify a row for the name.
765
+ If ``Geocoder`` has parent states this field must be present to identify a row for the name.
755
766
  country : str
756
- If `Geocoder` has parent countries this field must be present to identify a row for the name.
757
- scope : str or `Geocoder` or `shapely.geometry.Polygon`
767
+ If ``Geocoder`` has parent countries this field must be present to identify a row for the name.
768
+ scope : str or ``Geocoder`` or ``shapely.geometry.Polygon``
758
769
  Limits area of geocoding. If parent country is set then error will be generated.
759
770
  If type is a str - geoobject should have geocoded scope in parents.
760
- If type is a `Geocoder` - geoobject should have geocoded scope in parents.
771
+ If type is a ``Geocoder`` - geoobject should have geocoded scope in parents.
761
772
  Scope should contain only one entry.
762
- If type is a `shapely.geometry.Polygon` -
773
+ If type is a ``shapely.geometry.Polygon`` -
763
774
  geoobject centroid should fall into bbox of the polygon.
764
- closest_to : `Geocoder` or `shapely.geometry.Point`
775
+ closest_to : ``Geocoder`` or ``shapely.geometry.Point``
765
776
  Resolve ambiguity by taking closest geoobject.
766
777
 
767
778
  Returns
768
779
  -------
769
- `NamesGeocoder`
780
+ ``NamesGeocoder``
770
781
  Geocoder object specification.
771
782
 
772
783
  Examples
lets_plot/mapping.py CHANGED
@@ -37,15 +37,15 @@ def as_discrete(variable, label=None, order_by=None, order=None, levels=None):
37
37
 
38
38
  Returns
39
39
  -------
40
- `MappingMeta` or list
40
+ ``MappingMeta`` or list
41
41
  Variable meta information.
42
42
 
43
43
  Notes
44
44
  -----
45
45
  The plot will use a discrete scale for the aesthetic mapping.
46
- It is similar to the `factor()` function from R but works differently - there is no data transformation.
46
+ It is similar to the ``factor()`` function from R but works differently - there is no data transformation.
47
47
 
48
- To enable ordering mode, at least one ordering parameter (`order_by` or `order`) should be specified.
48
+ To enable ordering mode, at least one ordering parameter (``order_by`` or ``order``) should be specified.
49
49
  By the default, it will use descending direction and ordering by eigenvalues.
50
50
  You cannot specify different order settings for the same variable.
51
51
  But if these settings don't contradict each other, they will be combined.