Tutorials

Tutorials#

Entry-point material for learning the API on synthetic data.

Getting started

The fluent .pl API, layering, and styling on the in-memory blobs dataset. Ideal first read.

Getting started with spatialdata-plot
Colour and palettes

How color= resolves, the v0.3.0 groups behaviour, and building perceptually well-spaced or colourblind-safe palettes with make_palette and make_palette_from_data.

Colour and palettes in spatialdata-plot
Multi-panel colouring

Render several colourings at once by passing a list to color=, scanpy-style, with per-panel legends/colourbars, shared palette/cmap, and ncols grid control.

Multi-panel colouring in spatialdata-plot
Speeding up rendering

Keep rendering fast on large data: automatic rasterization and scale selection for images, and the datashader backend for large collections of shapes and points.

Speeding up the rendering of large data
Scalebars

Add a physical scalebar with scalebar_dx, choose units, and style placement, colour, length and fonts through scalebar_params.

Scalebars in spatialdata-plot
Multichannel & fluorescence images

Render multiplexed and fluorescence images: select channels by name, composite them with per-channel palette LUTs, fix heavy-tailed contrast per channel, and label the composite with channels_as_legend.

Multichannel and fluorescence images in spatialdata-plot