Skip to content

Commit f621d4e

Browse files
committed
Fix composition, npips wiring, pip_scale double-apply, tile params, domino hover
- Plotly dice + domino: axis range, reversed y, ticks, and aspect ratio now apply on both owns-figure and caller-supplied-fig branches. Legend-reserved x-domain [0, 0.72] / [0, 0.74] is owns-figure-only; composition uses [0, 1]. - Remove `npips` from the public API. Slot count is inferred from `pips_order` / `pip_colors` / data — no post-preprocess overwrite. - Collapse `tile_width` + `tile_height` into single `tile_size`. `_layout.py` takes `tile_frac` with (0, 1] validation. - Categorical pip radius is `layout.base_pip_r` (no double pip_scale). `base_pip_r` already folds `pip_scale`; the backends were multiplying again. - Plotly domino hover uses raw `size_value` via `customdata[4]` instead of the already-scaled `marker.size`. - Regenerated categorical showcase PNGs reflect the corrected pip size.
1 parent 54f5e3b commit f621d4e

18 files changed

Lines changed: 293 additions & 95 deletions

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ API refactor to match the new 1.0 conventions.
4646
- **Domino preprocessing rewrite.** Domino plots now validate their structural
4747
columns up front, enforce exactly two contrast slots, compute shared backend
4848
geometry once, and use the same color/size range semantics as `dice_plot`.
49-
- **Tile geometry controls.** `tile_width`, `tile_height`, `pip_scale`,
50-
`grid_lines` parameters.
49+
- **Tile geometry controls.** `tile_size`, `pip_scale`, `grid_lines` parameters.
5150
- **Label controls.** `fill_label`, `size_label`, `pips_label` set legend
5251
titles; `xlabel`, `ylabel`, `title` set axis / figure titles.
5352
- **pixi environment.** `pixi.toml` with `test`, `example`, `build`, `check`

example_code/oral_microbiome_fill_only.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run(out_dir: str = "images") -> None:
3333
pips_label="disease",
3434
cmap="ggdiceplot_pg",
3535
pip_scale=1.0,
36-
tile_width=0.9, tile_height=0.9,
36+
tile_size=0.9,
3737
figsize=(10, 10),
3838
)
3939
os.makedirs(out_dir, exist_ok=True)

example_code/pathways_nine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def run(out_dir: str = "images") -> None:
111111
pips_label="pathway",
112112
cmap="ggdiceplot_pg",
113113
pip_scale=0.95,
114-
tile_width=0.92, tile_height=0.92,
114+
tile_size=0.92,
115115
figsize=(13, 10),
116116
)
117117
os.makedirs(out_dir, exist_ok=True)

example_code/zebra_domino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run(out_dir: str = "images") -> None:
5151
size_label="-log10(FDR)",
5252
pips_label="contrast",
5353
cmap="ggdiceplot_pg",
54-
tile_width=0.9, tile_height=0.9,
54+
tile_size=0.9,
5555
figsize=(12, 14),
5656
)
5757
os.makedirs(out_dir, exist_ok=True)

images/dice_4_categorical.png

3.83 KB
Loading

images/dice_6_categorical.png

4.97 KB
Loading

images/dice_9_categorical.png

6.43 KB
Loading

images/domino_example.png

-6.16 KB
Loading

images/ggport_mirna_direction.png

7.65 KB
Loading

images/ggport_zebra_domino.png

-22.7 KB
Loading

0 commit comments

Comments
 (0)