lets-plot 4.4.1__cp311-cp311-macosx_11_0_arm64.whl → 4.5.0rc1__cp311-cp311-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/_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.0rc1'
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,6 +50,20 @@ 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
69
  For more info see https://lets-plot.org/python/pages/aesthetics.html#color-and-fill.
@@ -67,10 +82,11 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
67
82
  For more info see 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'.
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, ...].
74
90
  For more info see https://lets-plot.org/python/pages/aesthetics.html#line-types.
75
91
 
76
92
  Returns
@@ -174,6 +190,7 @@ def qq_plot(data=None, sample=None, *, x=None, y=None,
174
190
  'quantiles': quantiles,
175
191
  'group': group,
176
192
  'show_legend': show_legend,
193
+ 'marginal': marginal,
177
194
  'color': color,
178
195
  'fill': fill,
179
196
  'alpha': alpha,
@@ -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,
@@ -49,10 +50,11 @@ def waterfall_plot(data, x, y, *,
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'.
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, ...].
56
58
  For more info see 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.
@@ -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.
@@ -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::