Commit afa4056
docs: add a Scalebars tutorial (#12)
* docs: add a Scalebars tutorial
A focused tutorial on drawing physical scalebars via the scalebar_* arguments
of .pl.show(), on the synthetic blobs dataset:
- scalebar_dx (the one required piece) and why it's needed: SpatialData
coordinate systems carry no unit metadata, so you supply the physical size
of one axes-unit.
- scalebar_units and automatic magnitude scaling (um -> mm).
- styling via scalebar_params (placement, colour, box, length_fraction,
scale_loc, fonts) - forwarded verbatim to matplotlib-scalebar.
- fixed_value for an exact bar length.
- cross-links the Visium example for a real-data figure.
Wired into the gallery: card in tutorials/index.md (inside the gallery-cards
markers, root-relative paths) + toctree entry + thumbnail. Addresses part of
scverse/spatialdata-plot#463.
* docs(scalebars): fix white-on-white bar in the fonts and fixed-length cells
Those two cells set color="white" but relied on matplotlib-scalebar's default
white box, so the bar landed on the box and vanished. Give them a translucent
dark box (box_color/box_alpha), and add a note to the appearance section that
white bars on a dark image need a dark box or frameon=False.
* docs(scalebars): tighten prose, fix thumbnail, correct asset-path docs
- Prose pass on the scalebar tutorial markdown cells.
- Regenerate the gallery thumbnail from the notebook's final plot: no
title/axes, landscape ~1.11 ratio to match the sibling cards.
- CONTRIBUTING: reference assets by the submodule-mount paths (absolute
/notebooks/... for index.md cards, relative ../ from notebook cells).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(scalebars): add rotation + label section, sync thumbnail
- New §5 demonstrating a vertical bar (`rotation`) and a custom bar title
(`label`/`label_loc`); old wrap-up renumbered to §6.
- Regenerate the gallery thumbnail from this final plot: vertical 100 µm
bar with a "scale" label, landscape ~1.11 to match the sibling cards.
- Re-executed end-to-end so committed outputs are current.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6a6e73c commit afa4056
4 files changed
Lines changed: 476 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| 57 | + | |
48 | 58 | | |
Large diffs are not rendered by default.
0 commit comments