staplot 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.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.
- staplot/__init__.py +1 -1
- staplot/api.py +16 -3
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/METADATA +1 -1
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/RECORD +8 -8
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/WHEEL +0 -0
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/entry_points.txt +0 -0
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {staplot-0.1.2.dist-info → staplot-0.1.3.dist-info}/top_level.txt +0 -0
staplot/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.3"
|
staplot/api.py
CHANGED
|
@@ -726,9 +726,12 @@ def suggest_kind(source, columns=None, where=None, skip_rows=None) -> dict:
|
|
|
726
726
|
if not numeric:
|
|
727
727
|
return {"kind": None, "n_min": None, "reason": "no column of numbers to plot"}
|
|
728
728
|
return {"kind": None, "n_min": None,
|
|
729
|
+
# the plot this table needs, named with its own columns (a seaborn plot
|
|
730
|
+
# was suggested instead; PyFigures MCP check 2026-11-21)
|
|
729
731
|
"reason": (f"a tidy table with factors ({', '.join(text)}) and measures "
|
|
730
|
-
f"({', '.join(numeric)}):
|
|
731
|
-
f"
|
|
732
|
+
f"({', '.join(numeric)}): pick one factor and one measure, "
|
|
733
|
+
f"columns=[{text[0]!r}, {numeric[-1]!r}]; another factor as a third column "
|
|
734
|
+
f"(grouped, split_violin) or as facet= (one plot per value)")}
|
|
732
735
|
table = table_from_csv(source)
|
|
733
736
|
else:
|
|
734
737
|
table = source
|
|
@@ -1152,6 +1155,12 @@ def plot(table, kind: str = "bar", *, error: str = "sd", annotate: bool = True,
|
|
|
1152
1155
|
*histogram* (one per column; *bins*); *heatmap* (the table's values; *cmap*).
|
|
1153
1156
|
"""
|
|
1154
1157
|
if ybreak:
|
|
1158
|
+
# these were silently left out of a broken axis (PyFigures MCP check 2026-11-21)
|
|
1159
|
+
if y2:
|
|
1160
|
+
raise ValueError("a broken y axis (ybreak) and a right-hand axis (y2) cannot be combined: "
|
|
1161
|
+
"keep one, or show the second measure in its own plot")
|
|
1162
|
+
if invert_y or log_y:
|
|
1163
|
+
raise ValueError("a broken y axis (ybreak) cannot also be inverted or logarithmic")
|
|
1155
1164
|
return _plot_broken(table, kind, ybreak, dict(
|
|
1156
1165
|
error=error, annotate=annotate, only_significant=only_significant, stats_mode=stats_mode,
|
|
1157
1166
|
title=title, ylabel=ylabel, xlabel=xlabel, colors=colors, show_title=show_title, order=order,
|
|
@@ -1234,7 +1243,11 @@ def _plot_broken(table, kind, ybreak, kwargs, layout, ax=None):
|
|
|
1234
1243
|
broken_axes_marks(top, bottom)
|
|
1235
1244
|
label = ylabel or getattr(table, "value_name", "") or "Value"
|
|
1236
1245
|
if kwargs.get("show_ylabel", True) is not False:
|
|
1237
|
-
|
|
1246
|
+
# on the lower axes, centred on both halves: matplotlib keeps an axis label clear of
|
|
1247
|
+
# the tick labels (a figure supylabel sat on them once the panel was cropped)
|
|
1248
|
+
bottom.set_ylabel(label)
|
|
1249
|
+
b, t = bottom.get_position(), top.get_position()
|
|
1250
|
+
bottom.yaxis.label.set_y(((t.y1 + b.y0) / 2 - b.y0) / b.height)
|
|
1238
1251
|
if title and show_title:
|
|
1239
1252
|
top.set_title(title)
|
|
1240
1253
|
from .plots.extras import one_sided_errors, set_y_ticks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
staplot/__init__.py,sha256=
|
|
2
|
-
staplot/api.py,sha256=
|
|
1
|
+
staplot/__init__.py,sha256=LPNaKUFe5S0lxcbXP4IcviKz02tUsjRUDAJch2OV7IE,23
|
|
2
|
+
staplot/api.py,sha256=EYHds4HOcFxykSrdBQ0PHmpjzyjpvFK_fGoBY_oiiG8,138400
|
|
3
3
|
staplot/main.py,sha256=mzYHVbEf518E-Iw_DSIrNaBIP1GcheM2GUTRPtciJLc,451
|
|
4
4
|
staplot/models/__init__.py,sha256=rryJZhrEfMxOoXFEI3QmAnfPKytLNCeUmIEXAwqiGJg,100
|
|
5
5
|
staplot/models/project.py,sha256=IZCgYeIDMY3tWQokLoQPchDSlOm5K8jdy0Fd0eR3xT0,16645
|
|
@@ -65,9 +65,9 @@ staplot/ui/standard_curve_dialog.py,sha256=_xaGXmxfCgd6dnw9d3z-BVTQgyfFNYga_DLqx
|
|
|
65
65
|
staplot/ui/test_wizard.py,sha256=bZVRamIkxQd8dh-X76Kf3wS-C0dhbGYB-82LkBVQ46A,9637
|
|
66
66
|
staplot/ui/transform_dialog.py,sha256=BPpN4WeNMPbQEyU8NKB-pfrbhVgjFjmP0eSL9tX-zkc,5205
|
|
67
67
|
staplot/ui/undo_commands.py,sha256=tRdXnslwHXY8sDHHicfx894K_jLQhlSlzcLZq_AdZck,2794
|
|
68
|
-
staplot-0.1.
|
|
69
|
-
staplot-0.1.
|
|
70
|
-
staplot-0.1.
|
|
71
|
-
staplot-0.1.
|
|
72
|
-
staplot-0.1.
|
|
73
|
-
staplot-0.1.
|
|
68
|
+
staplot-0.1.3.dist-info/licenses/LICENSE,sha256=ogMfc01vPUbgHZ0-65HdaNOPnTZxDo4-BrCf9JkixhQ,1320
|
|
69
|
+
staplot-0.1.3.dist-info/METADATA,sha256=jLuFub05bY6k6_biQwYbJ05NY46MrRj9gF-PnE2RS0c,4505
|
|
70
|
+
staplot-0.1.3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
71
|
+
staplot-0.1.3.dist-info/entry_points.txt,sha256=NX6eHOWnKEt8KCdGgijmG0m8-T37KrF7XUS3DYRlxeg,91
|
|
72
|
+
staplot-0.1.3.dist-info/top_level.txt,sha256=H_X7xesByUq3dMKAuuPkniT_rv2kSufm5Ojp1aHYizk,8
|
|
73
|
+
staplot-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|