Skip to content

Commit d584a91

Browse files
committed
Add legends and colorbars example
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.
1 parent 9482378 commit d584a91

3 files changed

Lines changed: 548 additions & 0 deletions

File tree

169 KB
Loading

‎examples/index.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ Draw regions of interest directly on a `spatialdata-plot` canvas with
2424
`sdata.pl.annotate(...)` and persist them as a `ShapesModel` element.
2525
:::
2626

27+
:::{grid-item-card} Legends and colorbars
28+
:link: /notebooks/examples/legends_and_colorbars
29+
:link-type: doc
30+
:img-top: /notebooks/_static/img/legends_and_colorbars.png
31+
32+
Place and style categorical legends and continuous colorbars: `legend_loc`,
33+
`legend_title`, `na_in_legend`, `legend_params`, and `colorbar_params`, on a
34+
real Visium mouse-brain section.
35+
:::
36+
2737
::::
2838
<!-- gallery-cards-end -->
2939

@@ -33,4 +43,5 @@ Draw regions of interest directly on a `spatialdata-plot` canvas with
3343
3444
visium_mouse_brain
3545
interactive_annotate
46+
legends_and_colorbars
3647
```

‎examples/legends_and_colorbars.ipynb‎

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

0 commit comments

Comments
 (0)