Skip to content

docs: add legends and colorbars example - #18

Open
timtreis wants to merge 1 commit into
mainfrom
feat/legends-colorbars
Open

docs: add legends and colorbars example#18
timtreis wants to merge 1 commit into
mainfrom
feat/legends-colorbars

Conversation

@timtreis

Copy link
Copy Markdown
Member

Summary

Adds examples/legends_and_colorbars.ipynb documenting the show() legend/colorbar surface — a large previously-undocumented API area (every coloured plot has a key).

Real 10x Visium mouse-brain dataset (squidpy.datasets.visium_hne_sdata()): spots annotated with named-region cluster labels (categorical → legend) and per-spot counts (continuous → colorbar).

Covers:

  • categorical legend placement + styling: legend_loc (matplotlib locations and '* margin'), legend_fontsize/fontweight/fontoutline, legend_title
  • na_in_legend (with groups) and the bundled legend_params dict
  • continuous colorbar on/off and colorbar_params (label, orientation, loc)
  • a legend and a colorbar side by side in a multi-panel color=[...] figure

Executed against spatialdata-plot v0.4.1, committed with outputs. Adds the examples gallery card + toctree + thumbnail.

Part of the documentation-expansion series from the 0.4.0/0.4.1 gap analysis (P1.1).

New examples/legends_and_colorbars.ipynb on the real Visium mouse-brain
dataset (squidpy), covering the show() legend/colorbar surface that was
previously undocumented:

- categorical legend placement/styling: legend_loc (matplotlib locations
  and '* margin'), legend_fontsize/fontweight/fontoutline, legend_title
- na_in_legend (with groups) and the bundled legend_params dict
- continuous colorbar on/off and colorbar_params (label, orientation, loc)
- a legend and a colorbar side by side in a multi-panel color=[...] figure

Executed against spatialdata-plot v0.4.1; committed with outputs. Adds the
examples gallery card + toctree + thumbnail. Closes the P1.1 gap from the
0.4.0/0.4.1 doc-coverage analysis.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions

Copy link
Copy Markdown

📖 Docs preview: https://scverse.org/spatialdata-plot-tutorials/pr-18/gallery.html

Built from 0ba7a7d; redeployed on every push.

github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant