Skip to content

Commit c3ae9ba

Browse files
authored
docs: add colouring points example (#20)
* Add colouring points example New examples/colouring_points.ipynb covering render_points colour control on the real Xenium cells transcripts (squidpy): - continuous color= with a colorbar; cmap and norm to shape the mapping - categorical color= with a legend; palette, groups, and na_color - size and alpha - uses the matplotlib backend for per-point colour (datashader/density noted for scale, cross-linked to the density and performance notebooks) Executed against spatialdata-plot v0.4.1; committed with outputs. Adds the examples gallery card + toctree + thumbnail. Closes P2.1 of the doc-coverage analysis. * docs(colouring_points): add dataset blurb + transcripts columns, na_color-hides-unmatched rule, concrete 10k datashader threshold
1 parent 429f4cb commit c3ae9ba

3 files changed

Lines changed: 485 additions & 0 deletions

File tree

_static/img/colouring_points.png

226 KB
Loading

examples/colouring_points.ipynb

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

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} Colouring points
28+
:link: /notebooks/examples/colouring_points
29+
:link-type: doc
30+
:img-top: /notebooks/_static/img/colouring_points.png
31+
32+
Colour a point element by continuous (`cmap`, `norm`, colorbar) or
33+
categorical (`palette`, `groups`, `na_color`, legend) columns, and tune
34+
`size`/`alpha`, on real Xenium transcripts.
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+
colouring_points
3647
```

0 commit comments

Comments
 (0)