docs: add a Scalebars tutorial#12
Open
timtreis wants to merge 4 commits into
Open
Conversation
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.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
📖 Docs preview: https://scverse.org/spatialdata-plot-notebooks/pr-12/gallery.html Built from 8bfdc87; redeployed on every push. |
… 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.
- 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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Scalebars tutorial to the
tutorials/gallery.