scistackplot 0.1.66__tar.gz → 0.2.1__tar.gz
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.
- {scistackplot-0.1.66 → scistackplot-0.2.1}/PKG-INFO +14 -14
- {scistackplot-0.1.66 → scistackplot-0.2.1}/README.md +11 -11
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/__init__.py +38 -32
- scistackplot-0.2.1/src/scistackplot/export/__init__.py +1 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/export}/codegen.py +469 -339
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/export}/custom.py +25 -25
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/export}/figure_file.py +3 -3
- scistackplot-0.1.66/src/scistackplot/export.py → scistackplot-0.2.1/src/scistackplot/export/plot_data.py +70 -19
- scistackplot-0.2.1/src/scistackplot/export/reduction_code.py +377 -0
- scistackplot-0.2.1/src/scistackplot/model/__init__.py +1 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/capability.py +44 -35
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/design.py +4 -2
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/presets.py +8 -3
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/restore.py +5 -5
- scistackplot-0.2.1/src/scistackplot/model/role_labels.py +74 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/roles.py +66 -33
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/shape.py +2 -2
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/spec.py +96 -20
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/model}/table.py +9 -4
- scistackplot-0.2.1/src/scistackplot/reduce/__init__.py +1 -0
- scistackplot-0.2.1/src/scistackplot/reduce/bins.py +755 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/categorical.py +96 -196
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/cell.py +28 -56
- scistackplot-0.2.1/src/scistackplot/reduce/chain.py +62 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/compare.py +15 -10
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/diffbars.py +10 -10
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/fits.py +2 -2
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/groups.py +39 -88
- scistackplot-0.2.1/src/scistackplot/reduce/kde.py +157 -0
- scistackplot-0.2.1/src/scistackplot/reduce/omissions.py +261 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/panels.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/reducer.py +13 -13
- scistackplot-0.2.1/src/scistackplot/reduce/reduction.py +353 -0
- scistackplot-0.1.66/src/scistackplot/reduce.py → scistackplot-0.2.1/src/scistackplot/reduce/resolve.py +273 -73
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/resolved.py +36 -5
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/rows.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/series_stats.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/spaghetti.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/stacking.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/variants.py +6 -6
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/weights.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/ylimits.py +9 -7
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/render/__init__.py +1 -1
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/render/base.py +102 -14
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/render/mpl.py +111 -29
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/render/plotly_.py +164 -18
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/sources/base.py +8 -8
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/sources/csv.py +1 -1
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/sources/frame.py +1 -1
- scistackplot-0.2.1/src/scistackplot/text/__init__.py +1 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/aliases.py +5 -5
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/autosize.py +3 -3
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/colors.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/textsize.py +2 -2
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/ticklabels.py +1 -1
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/xaxis.py +1 -1
- scistackplot-0.1.66/src/scistackplot/bins.py +0 -367
- {scistackplot-0.1.66 → scistackplot-0.2.1}/.gitignore +0 -0
- {scistackplot-0.1.66 → scistackplot-0.2.1}/pyproject.toml +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/numeric.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/spread.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/reduce}/temporal.py +0 -0
- {scistackplot-0.1.66 → scistackplot-0.2.1}/src/scistackplot/sources/__init__.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/sources}/dedup.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/figsize.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/framesize.py +0 -0
- {scistackplot-0.1.66/src/scistackplot → scistackplot-0.2.1/src/scistackplot/text}/paper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scistackplot
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Spec-driven plotting for long-format scientific data — standalone, GUI-friendly
|
|
5
5
|
Author: SciStack Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,8 +20,8 @@ Requires-Python: >=3.10
|
|
|
20
20
|
Requires-Dist: csv-stats>=0.5.0
|
|
21
21
|
Requires-Dist: numpy>=1.21
|
|
22
22
|
Requires-Dist: pandas>=1.5
|
|
23
|
-
Requires-Dist: scicanonicalhash==0.1
|
|
24
|
-
Requires-Dist: scistacklog==0.1
|
|
23
|
+
Requires-Dist: scicanonicalhash==0.2.1
|
|
24
|
+
Requires-Dist: scistacklog==0.2.1
|
|
25
25
|
Provides-Extra: dev
|
|
26
26
|
Requires-Dist: matplotlib>=3.6; extra == 'dev'
|
|
27
27
|
Requires-Dist: plotly>=5.0; extra == 'dev'
|
|
@@ -126,7 +126,7 @@ sessions inside their group. It needs two grouping layers, and the same list
|
|
|
126
126
|
read as a bar plot nests subject bars inside session ticks inside Intervention
|
|
127
127
|
brackets. Each subject keeps one small deterministic offset at every x
|
|
128
128
|
position (never a random jitter — a line must end on its own markers),
|
|
129
|
-
decided once per figure by `scistackplot.spaghetti.series_offsets` and read by
|
|
129
|
+
decided once per figure by `scistackplot.reduce.spaghetti.series_offsets` and read by
|
|
130
130
|
both renderers and the generated code.
|
|
131
131
|
|
|
132
132
|
**Show sample** puts the data behind a summary on top of it. `show_sample =
|
|
@@ -182,7 +182,7 @@ header, and the exported code draws the same date ticks. See
|
|
|
182
182
|
## Text measures
|
|
183
183
|
|
|
184
184
|
A text (or True/False) column is plotted by rewriting it into numbers first
|
|
185
|
-
(`scistackplot.categorical`), and the plot type decides how:
|
|
185
|
+
(`scistackplot.reduce.categorical`), and the plot type decides how:
|
|
186
186
|
|
|
187
187
|
| Plot type | What it draws | "Show sample" |
|
|
188
188
|
|---|---|---|
|
|
@@ -430,7 +430,7 @@ columns as fit. `PlotSpec.sample_in_legend=False` (the Show sample pane's
|
|
|
430
430
|
|
|
431
431
|
`StyleOptions.width` / `height` are inches and size the **saved** figure and
|
|
432
432
|
the generated code; the interactive preview fills whatever pane it is in.
|
|
433
|
-
`scistackplot.figsize` is the one vocabulary of aspect-ratio presets (`4:3`,
|
|
433
|
+
`scistackplot.text.figsize` is the one vocabulary of aspect-ratio presets (`4:3`,
|
|
434
434
|
`16:9`, `3:2`, golden, `2:1`, `1:1`, two portrait ratios, `custom`): pick a
|
|
435
435
|
ratio, name a width — a journal column is 3.5 in, a double column 7.2 in — and
|
|
436
436
|
`height_for` gives the height. `aspect_name` runs the other way, so a reopened
|
|
@@ -456,7 +456,7 @@ size (drawn at Width x Height, 1 pt = 1 px) or at the pane's size ("Fit pane").
|
|
|
456
456
|
`legend` and `legend_title` are each either fixed or `None`, which derives
|
|
457
457
|
them from `base` with matplotlib's own ratios. Only `base` set draws exactly
|
|
458
458
|
what one font knob would. A fixed size is never shrunk by the label or legend
|
|
459
|
-
fit, which may still rotate, wrap or move it. `scistackplot.textsize` is the
|
|
459
|
+
fit, which may still rotate, wrap or move it. `scistackplot.text.textsize` is the
|
|
460
460
|
one owner (`resolve_sizes`, `rc_params`). The export, the generated code and
|
|
461
461
|
the plotly preview (as px) all read it, under `rc_context` so nothing leaks
|
|
462
462
|
into the next figure. See `docs/claude/plot-text-and-labels.md`.
|
|
@@ -467,7 +467,7 @@ axis and legend titles 1.2, the rest 1.0, overridable per element in
|
|
|
467
467
|
`TextSizes.ratios`), clamped into that element's floor/ceiling (the band of
|
|
468
468
|
`TextSizes.target` × the ratio — `"print"` 8–12 pt, `"slide"` 14–28 pt — or
|
|
469
469
|
`TextSizes.floors` / `ceilings` in pt). With `base` unset (`None`),
|
|
470
|
-
`scistackplot.autosize` searches the largest reference whose real matplotlib
|
|
470
|
+
`scistackplot.text.autosize` searches the largest reference whose real matplotlib
|
|
471
471
|
layout breaks no rule: no text into text (tick fit, numeric tick collisions,
|
|
472
472
|
neighbouring panels, brackets, legend), nothing off the canvas, at least 3
|
|
473
473
|
tick labels per numeric axis, no y title taller than its panel. One failing
|
|
@@ -478,7 +478,7 @@ number in `base` fixes the reference (unclamped).
|
|
|
478
478
|
|
|
479
479
|
The figure's **paper** (white background, black text, a black frame round every
|
|
480
480
|
panel, outward ticks, no grid, and the error-bar ink) has one owner,
|
|
481
|
-
`scistackplot.paper.PAPER`. Its values are matplotlib's defaults, written
|
|
481
|
+
`scistackplot.text.paper.PAPER`. Its values are matplotlib's defaults, written
|
|
482
482
|
out. The export, the generated code and the plotly preview all draw it, so
|
|
483
483
|
the preview shows the saved figure's page rather than plotly's grid. A
|
|
484
484
|
personal `matplotlibrc` cannot change an export. The Plot Studio shows the
|
|
@@ -488,7 +488,7 @@ See `docs/claude/preview-paper-parity.md`.
|
|
|
488
488
|
`StyleOptions.sample_weight` and `StyleOptions.line_weight` are multipliers
|
|
489
489
|
(default 1) on the point size AND line thickness together: the first for the
|
|
490
490
|
"Show sample" overlay's points and joining lines, the second for a
|
|
491
|
-
spaghetti's own points and lines. `scistackplot.weights` is the one owner;
|
|
491
|
+
spaghetti's own points and lines. `scistackplot.reduce.weights` is the one owner;
|
|
492
492
|
matplotlib, the plotly preview and the generated code all read it.
|
|
493
493
|
|
|
494
494
|
## What the text reads as: display aliases
|
|
@@ -515,7 +515,7 @@ titles). `levels` is used wherever a value appears: ticks, brackets,
|
|
|
515
515
|
legend entries, panel titles and figure titles.
|
|
516
516
|
|
|
517
517
|
A scidb-backed table also carries the project's aliases (`[aliases]` in
|
|
518
|
-
`scistack.toml`, read live through `
|
|
518
|
+
`scistack.toml`, read live through `scifor.project.aliases`). The plot's own entries
|
|
519
519
|
override them field by field, and `""` shows the raw text again.
|
|
520
520
|
|
|
521
521
|
Only the text changes. Filters, facet layout rules, the level order and
|
|
@@ -523,7 +523,7 @@ Only the text changes. Filters, facet layout rules, the level order and
|
|
|
523
523
|
draws. The exported code writes the merged aliases in as a literal and
|
|
524
524
|
relabels what it drew. Two levels of one factor that would read the same are
|
|
525
525
|
refused (`AliasError`), because the figure could not tell them apart.
|
|
526
|
-
`scistackplot.aliases.DisplayText` (on `ResolvedPlot.text`) is the one owner
|
|
526
|
+
`scistackplot.text.aliases.DisplayText` (on `ResolvedPlot.text`) is the one owner
|
|
527
527
|
of how every level and name reads. See `docs/claude/plot-text-and-labels.md`.
|
|
528
528
|
|
|
529
529
|
## What colour a mark is: pinned colours
|
|
@@ -541,11 +541,11 @@ spec = PlotSpec(
|
|
|
541
541
|
```
|
|
542
542
|
|
|
543
543
|
Colours may be `#rrggbb`, `#rgb`, `rgb(r, g, b)` or a matplotlib colour
|
|
544
|
-
name. `scistackplot.colors.parse_color` is the one reader, and it
|
|
544
|
+
name. `scistackplot.text.colors.parse_color` is the one reader, and it
|
|
545
545
|
canonicalises every colour to `#rrggbb`.
|
|
546
546
|
|
|
547
547
|
A scidb-backed table also carries the project's `[colors]` (read live
|
|
548
|
-
through `
|
|
548
|
+
through `scifor.project.colors`). The plot's pins override them level by level.
|
|
549
549
|
|
|
550
550
|
A level you don't pin keeps its palette colour at its declared position, so
|
|
551
551
|
pinning one level never moves another's.
|
|
@@ -85,7 +85,7 @@ sessions inside their group. It needs two grouping layers, and the same list
|
|
|
85
85
|
read as a bar plot nests subject bars inside session ticks inside Intervention
|
|
86
86
|
brackets. Each subject keeps one small deterministic offset at every x
|
|
87
87
|
position (never a random jitter — a line must end on its own markers),
|
|
88
|
-
decided once per figure by `scistackplot.spaghetti.series_offsets` and read by
|
|
88
|
+
decided once per figure by `scistackplot.reduce.spaghetti.series_offsets` and read by
|
|
89
89
|
both renderers and the generated code.
|
|
90
90
|
|
|
91
91
|
**Show sample** puts the data behind a summary on top of it. `show_sample =
|
|
@@ -141,7 +141,7 @@ header, and the exported code draws the same date ticks. See
|
|
|
141
141
|
## Text measures
|
|
142
142
|
|
|
143
143
|
A text (or True/False) column is plotted by rewriting it into numbers first
|
|
144
|
-
(`scistackplot.categorical`), and the plot type decides how:
|
|
144
|
+
(`scistackplot.reduce.categorical`), and the plot type decides how:
|
|
145
145
|
|
|
146
146
|
| Plot type | What it draws | "Show sample" |
|
|
147
147
|
|---|---|---|
|
|
@@ -389,7 +389,7 @@ columns as fit. `PlotSpec.sample_in_legend=False` (the Show sample pane's
|
|
|
389
389
|
|
|
390
390
|
`StyleOptions.width` / `height` are inches and size the **saved** figure and
|
|
391
391
|
the generated code; the interactive preview fills whatever pane it is in.
|
|
392
|
-
`scistackplot.figsize` is the one vocabulary of aspect-ratio presets (`4:3`,
|
|
392
|
+
`scistackplot.text.figsize` is the one vocabulary of aspect-ratio presets (`4:3`,
|
|
393
393
|
`16:9`, `3:2`, golden, `2:1`, `1:1`, two portrait ratios, `custom`): pick a
|
|
394
394
|
ratio, name a width — a journal column is 3.5 in, a double column 7.2 in — and
|
|
395
395
|
`height_for` gives the height. `aspect_name` runs the other way, so a reopened
|
|
@@ -415,7 +415,7 @@ size (drawn at Width x Height, 1 pt = 1 px) or at the pane's size ("Fit pane").
|
|
|
415
415
|
`legend` and `legend_title` are each either fixed or `None`, which derives
|
|
416
416
|
them from `base` with matplotlib's own ratios. Only `base` set draws exactly
|
|
417
417
|
what one font knob would. A fixed size is never shrunk by the label or legend
|
|
418
|
-
fit, which may still rotate, wrap or move it. `scistackplot.textsize` is the
|
|
418
|
+
fit, which may still rotate, wrap or move it. `scistackplot.text.textsize` is the
|
|
419
419
|
one owner (`resolve_sizes`, `rc_params`). The export, the generated code and
|
|
420
420
|
the plotly preview (as px) all read it, under `rc_context` so nothing leaks
|
|
421
421
|
into the next figure. See `docs/claude/plot-text-and-labels.md`.
|
|
@@ -426,7 +426,7 @@ axis and legend titles 1.2, the rest 1.0, overridable per element in
|
|
|
426
426
|
`TextSizes.ratios`), clamped into that element's floor/ceiling (the band of
|
|
427
427
|
`TextSizes.target` × the ratio — `"print"` 8–12 pt, `"slide"` 14–28 pt — or
|
|
428
428
|
`TextSizes.floors` / `ceilings` in pt). With `base` unset (`None`),
|
|
429
|
-
`scistackplot.autosize` searches the largest reference whose real matplotlib
|
|
429
|
+
`scistackplot.text.autosize` searches the largest reference whose real matplotlib
|
|
430
430
|
layout breaks no rule: no text into text (tick fit, numeric tick collisions,
|
|
431
431
|
neighbouring panels, brackets, legend), nothing off the canvas, at least 3
|
|
432
432
|
tick labels per numeric axis, no y title taller than its panel. One failing
|
|
@@ -437,7 +437,7 @@ number in `base` fixes the reference (unclamped).
|
|
|
437
437
|
|
|
438
438
|
The figure's **paper** (white background, black text, a black frame round every
|
|
439
439
|
panel, outward ticks, no grid, and the error-bar ink) has one owner,
|
|
440
|
-
`scistackplot.paper.PAPER`. Its values are matplotlib's defaults, written
|
|
440
|
+
`scistackplot.text.paper.PAPER`. Its values are matplotlib's defaults, written
|
|
441
441
|
out. The export, the generated code and the plotly preview all draw it, so
|
|
442
442
|
the preview shows the saved figure's page rather than plotly's grid. A
|
|
443
443
|
personal `matplotlibrc` cannot change an export. The Plot Studio shows the
|
|
@@ -447,7 +447,7 @@ See `docs/claude/preview-paper-parity.md`.
|
|
|
447
447
|
`StyleOptions.sample_weight` and `StyleOptions.line_weight` are multipliers
|
|
448
448
|
(default 1) on the point size AND line thickness together: the first for the
|
|
449
449
|
"Show sample" overlay's points and joining lines, the second for a
|
|
450
|
-
spaghetti's own points and lines. `scistackplot.weights` is the one owner;
|
|
450
|
+
spaghetti's own points and lines. `scistackplot.reduce.weights` is the one owner;
|
|
451
451
|
matplotlib, the plotly preview and the generated code all read it.
|
|
452
452
|
|
|
453
453
|
## What the text reads as: display aliases
|
|
@@ -474,7 +474,7 @@ titles). `levels` is used wherever a value appears: ticks, brackets,
|
|
|
474
474
|
legend entries, panel titles and figure titles.
|
|
475
475
|
|
|
476
476
|
A scidb-backed table also carries the project's aliases (`[aliases]` in
|
|
477
|
-
`scistack.toml`, read live through `
|
|
477
|
+
`scistack.toml`, read live through `scifor.project.aliases`). The plot's own entries
|
|
478
478
|
override them field by field, and `""` shows the raw text again.
|
|
479
479
|
|
|
480
480
|
Only the text changes. Filters, facet layout rules, the level order and
|
|
@@ -482,7 +482,7 @@ Only the text changes. Filters, facet layout rules, the level order and
|
|
|
482
482
|
draws. The exported code writes the merged aliases in as a literal and
|
|
483
483
|
relabels what it drew. Two levels of one factor that would read the same are
|
|
484
484
|
refused (`AliasError`), because the figure could not tell them apart.
|
|
485
|
-
`scistackplot.aliases.DisplayText` (on `ResolvedPlot.text`) is the one owner
|
|
485
|
+
`scistackplot.text.aliases.DisplayText` (on `ResolvedPlot.text`) is the one owner
|
|
486
486
|
of how every level and name reads. See `docs/claude/plot-text-and-labels.md`.
|
|
487
487
|
|
|
488
488
|
## What colour a mark is: pinned colours
|
|
@@ -500,11 +500,11 @@ spec = PlotSpec(
|
|
|
500
500
|
```
|
|
501
501
|
|
|
502
502
|
Colours may be `#rrggbb`, `#rgb`, `rgb(r, g, b)` or a matplotlib colour
|
|
503
|
-
name. `scistackplot.colors.parse_color` is the one reader, and it
|
|
503
|
+
name. `scistackplot.text.colors.parse_color` is the one reader, and it
|
|
504
504
|
canonicalises every colour to `#rrggbb`.
|
|
505
505
|
|
|
506
506
|
A scidb-backed table also carries the project's `[colors]` (read live
|
|
507
|
-
through `
|
|
507
|
+
through `scifor.project.colors`). The plot's pins override them level by level.
|
|
508
508
|
|
|
509
509
|
A level you don't pin keeps its palette colour at its declared position, so
|
|
510
510
|
pinning one level never moves another's.
|
|
@@ -33,7 +33,7 @@ from __future__ import annotations
|
|
|
33
33
|
|
|
34
34
|
from typing import Any
|
|
35
35
|
|
|
36
|
-
from .capability import (
|
|
36
|
+
from .model.capability import (
|
|
37
37
|
available_plots,
|
|
38
38
|
capabilities,
|
|
39
39
|
default_plot,
|
|
@@ -47,33 +47,33 @@ from .capability import (
|
|
|
47
47
|
variant_summary,
|
|
48
48
|
why_unavailable,
|
|
49
49
|
)
|
|
50
|
-
from .categorical import (
|
|
50
|
+
from .reduce.categorical import (
|
|
51
51
|
LEVEL_FACTOR,
|
|
52
52
|
MAX_CATEGORY_LEVELS,
|
|
53
53
|
apply_categorical,
|
|
54
54
|
categorical_mode,
|
|
55
55
|
mode_for_kind,
|
|
56
56
|
)
|
|
57
|
-
from .stacking import stack_bases, stacks
|
|
58
|
-
from .cell import apply_cell_collapse, cell_collapse_note, cell_collapses, effective_shape
|
|
59
|
-
from .codegen import (
|
|
57
|
+
from .reduce.stacking import stack_bases, stacks
|
|
58
|
+
from .reduce.cell import apply_cell_collapse, cell_collapse_note, cell_collapses, effective_shape
|
|
59
|
+
from .export.codegen import (
|
|
60
60
|
default_function_name,
|
|
61
61
|
extract_spec,
|
|
62
62
|
generate_plot_function,
|
|
63
63
|
generate_script,
|
|
64
64
|
)
|
|
65
|
-
from .export import (
|
|
65
|
+
from .export.plot_data import (
|
|
66
66
|
DataDepth,
|
|
67
67
|
DataExportOptions,
|
|
68
68
|
data_export_options,
|
|
69
69
|
data_unavailable,
|
|
70
70
|
plot_data,
|
|
71
71
|
)
|
|
72
|
-
from .reduce import MAX_TRANSPORT_POINTS, resolve, resolve_one
|
|
73
|
-
from .figure_file import WrittenFigure, canvas_overflow, write_figure
|
|
72
|
+
from .reduce.resolve import MAX_TRANSPORT_POINTS, resolve, resolve_one
|
|
73
|
+
from .export.figure_file import WrittenFigure, canvas_overflow, write_figure
|
|
74
74
|
from .render import layout_decisions, render_matplotlib, render_plotly
|
|
75
|
-
from .resolved import Encoding, Labels, Panel, ResolvedPlot
|
|
76
|
-
from .roles import (
|
|
75
|
+
from .reduce.resolved import Encoding, Labels, Panel, ResolvedPlot
|
|
76
|
+
from .model.roles import (
|
|
77
77
|
Assignment,
|
|
78
78
|
GroupingLayers,
|
|
79
79
|
OverlayJoin,
|
|
@@ -94,6 +94,7 @@ from .roles import (
|
|
|
94
94
|
overlay_join,
|
|
95
95
|
overlay_steps,
|
|
96
96
|
overlay_unavailable,
|
|
97
|
+
overlay_is_rug,
|
|
97
98
|
role_for_new_grouping,
|
|
98
99
|
roles_for_kind,
|
|
99
100
|
sample_key,
|
|
@@ -102,10 +103,10 @@ from .roles import (
|
|
|
102
103
|
validate,
|
|
103
104
|
with_requirements_for,
|
|
104
105
|
)
|
|
105
|
-
from .restore import NoteKind, RestoreError, RestoreNote, Restored, reconcile, restore_spec
|
|
106
|
-
from .presets import FieldClass, apply_preset, make_template, shape_warning
|
|
107
|
-
from .compare import CompareMode, Comparison
|
|
108
|
-
from .custom import (
|
|
106
|
+
from .model.restore import NoteKind, RestoreError, RestoreNote, Restored, reconcile, restore_spec
|
|
107
|
+
from .model.presets import FieldClass, apply_preset, make_template, shape_warning
|
|
108
|
+
from .reduce.compare import CompareMode, Comparison
|
|
109
|
+
from .export.custom import (
|
|
109
110
|
CustomCall,
|
|
110
111
|
CustomFunctionError,
|
|
111
112
|
CustomSignature,
|
|
@@ -117,12 +118,12 @@ from .custom import (
|
|
|
117
118
|
resolve_custom,
|
|
118
119
|
resolve_custom_one,
|
|
119
120
|
)
|
|
120
|
-
from .diffbars import DifferenceBar, bars_for_panel, slot_endpoints
|
|
121
|
-
from .panels import PanelOverride, override_for
|
|
122
|
-
from .rows import ROW_FACTOR, element_values, explode_row_lists, row_factor, row_origin
|
|
123
|
-
from .shape import Shape, classify_column, classify_value, is_plottable
|
|
121
|
+
from .reduce.diffbars import DifferenceBar, bars_for_panel, slot_endpoints
|
|
122
|
+
from .reduce.panels import PanelOverride, override_for
|
|
123
|
+
from .reduce.rows import ROW_FACTOR, element_values, explode_row_lists, row_factor, row_origin
|
|
124
|
+
from .model.shape import Shape, classify_column, classify_value, is_plottable
|
|
124
125
|
from .sources import BaseSource, CsvSource, DataFrameSource, DataSource, UnknownMeasureError
|
|
125
|
-
from .spec import (
|
|
126
|
+
from .model.spec import (
|
|
126
127
|
BarOptions,
|
|
127
128
|
CategoricalOptions,
|
|
128
129
|
CategoricalStat,
|
|
@@ -133,6 +134,8 @@ from .spec import (
|
|
|
133
134
|
HistMultiple,
|
|
134
135
|
HistStat,
|
|
135
136
|
HistogramOptions,
|
|
137
|
+
KdeOptions,
|
|
138
|
+
UNIVARIATE_KINDS,
|
|
136
139
|
RegressionOptions,
|
|
137
140
|
StatsCorner,
|
|
138
141
|
LegacySpecError,
|
|
@@ -164,9 +167,9 @@ from .spec import (
|
|
|
164
167
|
grid_shape_for,
|
|
165
168
|
is_horizontal,
|
|
166
169
|
)
|
|
167
|
-
from .bins import BinEdges, BinError, bin_edges
|
|
168
|
-
from .fits import PanelFit, annotation_text
|
|
169
|
-
from .textsize import (
|
|
170
|
+
from .reduce.bins import BinEdges, BinError, bin_edges
|
|
171
|
+
from .reduce.fits import PanelFit, annotation_text
|
|
172
|
+
from .text.textsize import (
|
|
170
173
|
BANDS,
|
|
171
174
|
DEFAULT_TEXT_RATIOS,
|
|
172
175
|
ResolvedSizes,
|
|
@@ -175,10 +178,10 @@ from .textsize import (
|
|
|
175
178
|
resolve_sizes,
|
|
176
179
|
sizes_for,
|
|
177
180
|
)
|
|
178
|
-
from .autosize import AutoTextSize, settle as settle_text_size
|
|
179
|
-
from .aliases import AliasError, DisplayText, display_text
|
|
180
|
-
from .colors import ColorError, MarkColors, mark_colors, parse_color
|
|
181
|
-
from .figsize import (
|
|
181
|
+
from .text.autosize import AutoTextSize, settle as settle_text_size
|
|
182
|
+
from .text.aliases import AliasError, DisplayText, display_text
|
|
183
|
+
from .text.colors import ColorError, MarkColors, mark_colors, parse_color
|
|
184
|
+
from .text.figsize import (
|
|
182
185
|
ASPECT_PRESETS,
|
|
183
186
|
CUSTOM as CUSTOM_ASPECT,
|
|
184
187
|
AspectPreset,
|
|
@@ -187,7 +190,7 @@ from .figsize import (
|
|
|
187
190
|
height_for,
|
|
188
191
|
presets_payload,
|
|
189
192
|
)
|
|
190
|
-
from .ticklabels import (
|
|
193
|
+
from .text.ticklabels import (
|
|
191
194
|
BRACKET_POLICY,
|
|
192
195
|
TICK_POLICY,
|
|
193
196
|
LabelFit,
|
|
@@ -196,10 +199,10 @@ from .ticklabels import (
|
|
|
196
199
|
fit_labels,
|
|
197
200
|
slot_row,
|
|
198
201
|
)
|
|
199
|
-
from .xaxis import XGroup, XPlan, leaf_key, plan_x_axis
|
|
200
|
-
from .ylimits import describe as describe_y_limits
|
|
201
|
-
from .ylimits import eligible_scope, limits_by_scope
|
|
202
|
-
from .table import (
|
|
202
|
+
from .text.xaxis import XGroup, XPlan, leaf_key, plan_x_axis
|
|
203
|
+
from .reduce.ylimits import describe as describe_y_limits
|
|
204
|
+
from .reduce.ylimits import eligible_scope, limits_by_scope
|
|
205
|
+
from .model.table import (
|
|
203
206
|
CODE_FACTOR_PREFIX,
|
|
204
207
|
MISSING_LEVEL,
|
|
205
208
|
RUN_FACTOR_PREFIX,
|
|
@@ -208,7 +211,7 @@ from .table import (
|
|
|
208
211
|
MeasureInfo,
|
|
209
212
|
natural_sort_key,
|
|
210
213
|
)
|
|
211
|
-
from .variants import (
|
|
214
|
+
from .reduce.variants import (
|
|
212
215
|
LATEST,
|
|
213
216
|
VARIANT_FACTOR,
|
|
214
217
|
apply_variant_sets,
|
|
@@ -269,6 +272,8 @@ __all__ = [
|
|
|
269
272
|
"stacks",
|
|
270
273
|
"HistStat",
|
|
271
274
|
"HistogramOptions",
|
|
275
|
+
"KdeOptions",
|
|
276
|
+
"UNIVARIATE_KINDS",
|
|
272
277
|
"RegressionOptions",
|
|
273
278
|
"StatsCorner",
|
|
274
279
|
"BinEdges",
|
|
@@ -409,6 +414,7 @@ __all__ = [
|
|
|
409
414
|
"OverlaySteps",
|
|
410
415
|
"OverlayJoin",
|
|
411
416
|
"overlay_unavailable",
|
|
417
|
+
"overlay_is_rug",
|
|
412
418
|
"overlay_steps",
|
|
413
419
|
"overlay_join",
|
|
414
420
|
"overlay_color",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Outputs other than the two renderers: generated plot code, plot data, custom plot functions, figure files."""
|