lets-plot 4.4.1__cp311-cp311-win_amd64.whl → 4.5.0__cp311-cp311-win_amd64.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 (37) hide show
  1. lets_plot/__init__.py +1 -1
  2. lets_plot/_version.py +1 -1
  3. lets_plot/bistro/corr.py +6 -1
  4. lets_plot/bistro/joint.py +7 -2
  5. lets_plot/bistro/qq.py +30 -8
  6. lets_plot/bistro/residual.py +6 -1
  7. lets_plot/bistro/waterfall.py +12 -7
  8. lets_plot/export/ggsave_.py +21 -1
  9. lets_plot/package_data/lets-plot.min.js +1 -1
  10. lets_plot/plot/__init__.py +3 -1
  11. lets_plot/plot/annotation.py +1 -1
  12. lets_plot/plot/core.py +11 -5
  13. lets_plot/plot/expand_limits_.py +78 -0
  14. lets_plot/plot/facet.py +9 -5
  15. lets_plot/plot/geom.py +691 -183
  16. lets_plot/plot/geom_function_.py +13 -3
  17. lets_plot/plot/geom_imshow_.py +1 -0
  18. lets_plot/plot/geom_livemap_.py +32 -0
  19. lets_plot/plot/gggrid_.py +5 -4
  20. lets_plot/plot/ggtb_.py +46 -1
  21. lets_plot/plot/label.py +2 -2
  22. lets_plot/plot/sampling.py +14 -4
  23. lets_plot/plot/scale.py +40 -40
  24. lets_plot/plot/scale_colormap_mpl.py +3 -3
  25. lets_plot/plot/scale_identity_.py +11 -19
  26. lets_plot/plot/scale_position.py +14 -14
  27. lets_plot/plot/stat.py +44 -4
  28. lets_plot/plot/subplots.py +1 -1
  29. lets_plot/plot/theme_.py +93 -14
  30. lets_plot/plot/tooltip.py +1 -1
  31. lets_plot/tilesets.py +4 -69
  32. {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/METADATA +34 -18
  33. {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/RECORD +37 -36
  34. {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/WHEEL +1 -1
  35. lets_plot_kotlin_bridge.cp311-win_amd64.pyd +0 -0
  36. {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/LICENSE +0 -0
  37. {lets_plot-4.4.1.dist-info → lets_plot-4.5.0.dist-info}/top_level.txt +0 -0
lets_plot/__init__.py CHANGED
@@ -108,7 +108,7 @@ class LetsPlot:
108
108
  def set(cls, settings: Dict):
109
109
  """
110
110
  Set up library options.
111
- For more info see https://lets-plot.org/python/pages/basemap_tiles.html#configuring-globally.
111
+ For more info see `Configuring Globally <https://lets-plot.org/python/pages/basemap_tiles.html#configuring-globally>`__.
112
112
 
113
113
  Parameters
114
114
  ----------
lets_plot/_version.py CHANGED
@@ -3,4 +3,4 @@
3
3
  # Use of this source code is governed by the MIT license that can be found in the LICENSE file.
4
4
  #
5
5
  # see: https://www.python.org/dev/peps/pep-0440/#developmental-releases
6
- __version__ = '4.4.1'
6
+ __version__ = '4.5.0'
lets_plot/bistro/corr.py CHANGED
@@ -68,6 +68,11 @@ class corr_plot:
68
68
  """
69
69
  This class is intended to build correlation matrix plot.
70
70
 
71
+ Notes
72
+ -----
73
+ To hide axis tooltips, set 'blank' or the result of `element_blank()`
74
+ to the `axis_tooltip`, `axis_tooltip_x` or `axis_tooltip_y` parameter of the `theme()`.
75
+
71
76
  Examples
72
77
  --------
73
78
  .. jupyter-execute::
@@ -205,7 +210,7 @@ class corr_plot:
205
210
  If False - the text size is constant. Default - contextual.
206
211
  color : str
207
212
  Set text color.
208
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
213
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
209
214
  Default - contextual.
210
215
 
211
216
  Returns
lets_plot/bistro/joint.py CHANGED
@@ -64,7 +64,7 @@ def joint_plot(data, x, y, *,
64
64
  Applicable simultaneously for 'tile' geom and 'histogram' marginal.
65
65
  color : str
66
66
  Color of the geometry.
67
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
67
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
68
68
  size : float
69
69
  Size of the geometry.
70
70
  alpha : float
@@ -77,7 +77,7 @@ def joint_plot(data, x, y, *,
77
77
  True - show the line of linear regression.
78
78
  se : bool, default=True
79
79
  Display confidence interval around regression line.
80
- marginal : str, default='dens:r'
80
+ marginal : str
81
81
  Description of marginal layers packed to string value.
82
82
  Different marginals are separated by the ',' char.
83
83
  Parameters of a marginal are separated by the ':' char.
@@ -97,6 +97,11 @@ def joint_plot(data, x, y, *,
97
97
  `PlotSpec`
98
98
  Plot object specification.
99
99
 
100
+ Notes
101
+ -----
102
+ To hide axis tooltips, set 'blank' or the result of `element_blank()`
103
+ to the `axis_tooltip`, `axis_tooltip_x` or `axis_tooltip_y` parameter of the `theme()`.
104
+
100
105
  Examples
101
106
  --------
102
107
  .. jupyter-execute::
lets_plot/bistro/qq.py CHANGED
@@ -10,6 +10,7 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
10
10
  distribution=None, dparams=None, quantiles=None,
11
11
  group=None,
12
12
  show_legend=None,
13
+ marginal=None,
13
14
  color=None, fill=None, alpha=None, size=None, shape=None,
14
15
  line_color=None, line_size=None, linetype=None) -> PlotSpec:
15
16
  """
@@ -49,29 +50,44 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
49
50
  If it is specified and color-parameters isn't then different groups will has different colors.
50
51
  show_legend : bool, default=True
51
52
  False - do not show legend.
53
+ marginal : str, default='dens:tr'
54
+ Description of marginal layers packed to string value.
55
+ Different marginals are separated by the ',' char.
56
+ Parameters of a marginal are separated by the ':' char.
57
+ First parameter of a marginal is a geometry name.
58
+ Possible values: 'dens'/'density', 'hist'/'histogram', 'box'/'boxplot'.
59
+ Second parameter is a string specifying which sides of the plot the marginal layer will appear on.
60
+ Possible values: 't' (top), 'b' (bottom), 'l' (left), 'r' (right).
61
+ Third parameter (optional) is size of marginal.
62
+ To suppress marginals use `marginal='none'`.
63
+ Examples:
64
+ "hist:tr:0.3",
65
+ "dens:tr,hist:bl",
66
+ "box : tr : .05, dens : bl".
52
67
  color : str
53
68
  Color of a points.
54
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
69
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
55
70
  fill : str
56
71
  Color to paint shape's inner points. Is applied only to the points of shapes having inner points.
57
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
72
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
58
73
  alpha : float, default=0.5
59
74
  Transparency level of points. Accept values between 0 and 1.
60
75
  size : float, default=3.0
61
76
  Size of the points.
62
77
  shape : int
63
78
  Shape of the points, an integer from 0 to 25.
64
- For more info see https://lets-plot.org/python/pages/aesthetics.html#point-shapes.
79
+ For more info see `Point Shapes <https://lets-plot.org/python/pages/aesthetics.html#point-shapes>`__.
65
80
  line_color : str, default='#FF0000'
66
81
  Color of the fitting line.
67
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
82
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
68
83
  line_size : float, default=0.75
69
84
  Width of the fitting line.
70
- linetype : int or str
85
+ linetype : int or str or list
71
86
  Type of the fitting line.
72
- Codes and names: 0 = 'blank', 1 = 'solid', 2 = 'dashed',
73
- 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'.
74
- For more info see https://lets-plot.org/python/pages/aesthetics.html#line-types.
87
+ Accept codes or names (0 = 'blank', 1 = 'solid', 2 = 'dashed', 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'),
88
+ a hex string (up to 8 digits for dash-gap lengths),
89
+ or a list pattern [offset, [dash, gap, ...]] / [dash, gap, ...].
90
+ For more info see `Line Types <https://lets-plot.org/python/pages/aesthetics.html#line-types>`__.
75
91
 
76
92
  Returns
77
93
  -------
@@ -86,6 +102,11 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
86
102
  If the two distributions being compared are similar, the points in the Q-Q plot
87
103
  will approximately lie on the straight line.
88
104
 
105
+ ----
106
+
107
+ To hide axis tooltips, set 'blank' or the result of `element_blank()`
108
+ to the `axis_tooltip`, `axis_tooltip_x` or `axis_tooltip_y` parameter of the `theme()`.
109
+
89
110
  Examples
90
111
  --------
91
112
  .. jupyter-execute::
@@ -174,6 +195,7 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
174
195
  'quantiles': quantiles,
175
196
  'group': group,
176
197
  'show_legend': show_legend,
198
+ 'marginal': marginal,
177
199
  'color': color,
178
200
  'fill': fill,
179
201
  'alpha': alpha,
@@ -178,7 +178,7 @@ def residual_plot(data=None, x=None, y=None, *,
178
178
  Applicable simultaneously for 'tile' geom and 'histogram' marginal.
179
179
  color : str
180
180
  Color of the geometry.
181
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
181
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
182
182
  size : float
183
183
  Size of the geometry.
184
184
  alpha : float
@@ -214,6 +214,11 @@ def residual_plot(data=None, x=None, y=None, *,
214
214
  When using 'lm' and 'loess' methods,
215
215
  this function requires the `statsmodels` and `scipy` libraries to be installed.
216
216
 
217
+ ----
218
+
219
+ To hide axis tooltips, set 'blank' or the result of `element_blank()`
220
+ to the `axis_tooltip`, `axis_tooltip_x` or `axis_tooltip_y` parameter of the `theme()`.
221
+
217
222
  Examples
218
223
  --------
219
224
  .. jupyter-execute::
@@ -12,6 +12,7 @@ def waterfall_plot(data, x, y, *,
12
12
  width=None,
13
13
  show_legend=None, relative_tooltips=None, absolute_tooltips=None,
14
14
  sorted_value=None, threshold=None, max_values=None,
15
+ base=None,
15
16
  calc_total=None, total_title=None,
16
17
  hline=None, hline_ontop=None,
17
18
  connector=None,
@@ -39,21 +40,22 @@ def waterfall_plot(data, x, y, *,
39
40
  Grouping variable. Each group calculates its own statistics.
40
41
  color : str
41
42
  Color of the box boundary lines.
42
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
43
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
43
44
  Use 'flow_type' to color lines by the direction of the flow.
44
45
  fill : str
45
46
  Fill color of the boxes.
46
- For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
47
+ For more info see `Color and Fill <https://lets-plot.org/python/pages/aesthetics.html#color-and-fill>`__.
47
48
  Use 'flow_type' to color boxes by the direction of the flow.
48
49
  size : float, default=0.0
49
50
  Line width of the box boundary lines.
50
51
  alpha : float
51
52
  Transparency level of the boxes. Accept values between 0 and 1.
52
- linetype : int or str
53
+ linetype : int or str or list
53
54
  Type of the box boundary lines.
54
- Codes and names: 0 = 'blank', 1 = 'solid', 2 = 'dashed',
55
- 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'.
56
- For more info see https://lets-plot.org/python/pages/aesthetics.html#line-types.
55
+ Accept codes or names (0 = 'blank', 1 = 'solid', 2 = 'dashed', 3 = 'dotted', 4 = 'dotdash', 5 = 'longdash', 6 = 'twodash'),
56
+ a hex string (up to 8 digits for dash-gap lengths),
57
+ or a list pattern [offset, [dash, gap, ...]] / [dash, gap, ...].
58
+ For more info see `Line Types <https://lets-plot.org/python/pages/aesthetics.html#line-types>`__.
57
59
  width : float, default=0.9
58
60
  Width of the boxes. Typically range between 0 and 1.
59
61
  Values that are greater than 1 lead to overlapping of the boxes.
@@ -77,6 +79,8 @@ def waterfall_plot(data, x, y, *,
77
79
  Groups all categories under a certain threshold value into "Other" category.
78
80
  max_values : int
79
81
  Groups all categories with the smallest changes, except the first `max_values`, into "Other" category.
82
+ base : float, default=0.0
83
+ Values with measure 'absolute' or 'total' are relative to this value.
80
84
  calc_total : bool, default=True
81
85
  Setting the `calc_total` to True will put the final cumulative sum into a new separate box.
82
86
  Taken into account only if the 'measure' column isn't provided.
@@ -106,7 +110,7 @@ def waterfall_plot(data, x, y, *,
106
110
  - 'Num {}' -> 'Num 12.456789'
107
111
  - 'TTL: {.2f}$' -> 'TTL: 12.45$'
108
112
 
109
- For more info see https://lets-plot.org/python/pages/formats.html.
113
+ For more info see `Formatting <https://lets-plot.org/python/pages/formats.html>`__.
110
114
 
111
115
  Returns
112
116
  -------
@@ -235,6 +239,7 @@ def waterfall_plot(data, x, y, *,
235
239
  'sorted_value': sorted_value,
236
240
  'threshold': threshold,
237
241
  'max_values': max_values,
242
+ 'base': base,
238
243
  'calc_total': calc_total,
239
244
  'total_title': total_title,
240
245
  'hline': hline,
@@ -34,7 +34,7 @@ def ggsave(plot: Union[PlotSpec, SupPlotsSpec, GGBunch], filename: str, *, path:
34
34
  to one of the supported formats: SVG, HTML (or HTM), PNG (requires CairoSVG library), PDF.
35
35
  path : str
36
36
  Path to a directory to save image files in.
37
- By default it is ${user.dir}/lets-plot-images.
37
+ By default, it is ${user.dir}/lets-plot-images.
38
38
  iframe : bool, default=True
39
39
  Whether to wrap HTML page into a iFrame.
40
40
  Only applicable when exporting to HTML.
@@ -60,6 +60,26 @@ def ggsave(plot: Union[PlotSpec, SupPlotsSpec, GGBunch], filename: str, *, path:
60
60
  str
61
61
  Absolute pathname of created file.
62
62
 
63
+ Notes
64
+ -----
65
+ Output format is inferred from the filename extension.
66
+
67
+ For PNG and PDF formats:
68
+
69
+ 1. If `w`, `h`, `unit`, and `dpi` are all specified:
70
+
71
+ - `scale` is ignored.
72
+ - The plot's pixel size (default or set by `ggsize()`) is converted to the specified units using the given dpi.
73
+ - If the aspect ratio of `w` and `h` differs from the plot's pixel aspect ratio:
74
+
75
+ * The plot maintains its original (pixel) aspect ratio.
76
+ * It's fitted within the specified `w` x `h` area.
77
+ * Any extra space is left empty.
78
+
79
+ 2. If `w`, `h` are not specified:
80
+
81
+ - The `scale` parameter is used to determine the output size.
82
+
63
83
  Examples
64
84
  --------
65
85
  .. code-block::