Skip to content

Commit 9a18500

Browse files
committed
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.
1 parent 8d786cf commit 9a18500

3 files changed

Lines changed: 391 additions & 0 deletions

File tree

‎_static/img/scalebars.png‎

182 KB
Loading

‎tutorials/index.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ selection for images, and the `datashader` backend for large collections
3535
of shapes and points.
3636
:::
3737

38+
:::{grid-item-card} Scalebars
39+
:link: /notebooks/tutorials/scalebars
40+
:link-type: doc
41+
:img-top: /notebooks/_static/img/scalebars.png
42+
43+
Add a physical scalebar with `scalebar_dx`, choose units, and style
44+
placement, colour, length and fonts through `scalebar_params`.
45+
:::
46+
3847
::::
3948
<!-- gallery-cards-end -->
4049

@@ -45,4 +54,5 @@ of shapes and points.
4554
getting_started
4655
color_and_palette
4756
performance
57+
scalebars
4858
```

‎tutorials/scalebars.ipynb‎

Lines changed: 381 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)