Skip to content

docs: add point density maps example - #19

Open
timtreis wants to merge 3 commits into
mainfrom
feat/point-density
Open

docs: add point density maps example#19
timtreis wants to merge 3 commits into
mainfrom
feat/point-density

Conversation

@timtreis

Copy link
Copy Markdown
Member

Summary

Adds examples/point_density.ipynb documenting render_points(density=, density_how=) (#679) — a v0.4.0 feature with no prior tutorial.

Uses the full 10x Xenium breast-cancer sample (Janesick et al., SpatialData sandbox) — ~43 million transcripts — so the density maps are dense, smooth surfaces that resolve ducts and tumour nests (the small squidpy.datasets.cells crop, only 19k transcripts, was too sparse to show the feature).

Covers:

  • the overplotting problem (markers on a cropped 2 mm² window)
  • density=True → a datashader count-density heatmap of all transcripts
  • density_how (linear/log/eq_hist) reshaping the intensity mapping
  • per-category density via a categorical color + groups
  • the parameters density ignores (size, transfunc, norm limits, datashader_reduction)

Data is fetched via pooch.retrieve (hash-pinned) + sd.read_zarr. Executed against spatialdata-plot v0.4.1, committed with outputs. Adds the examples gallery card + toctree + thumbnail.

⚠️ CI cost: this notebook downloads ~3.6 GB (the Xenium zarr). Recommend excluding it from the weekly execute-all cron (or gating it) to keep CI light — the changed-files PR job will still execute it when the notebook itself changes. Happy to wire the exclusion if you point me at the preferred mechanism.

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

New examples/point_density.ipynb documenting render_points(density=, density_how=)
(#679), previously undocumented. Uses the full 10x Xenium breast-cancer sample
(~43M transcripts, SpatialData sandbox), fetched via pooch and read with
sd.read_zarr. Covers:

- the overplotting problem (markers on a cropped 2 mm^2 window)
- density=True -> a datashader count-density heatmap of all transcripts
- density_how (linear/log/eq_hist) reshaping the intensity mapping
- per-category density via a categorical color + groups
- the parameters density ignores (size/transfunc/norm limits/datashader_reduction)

Executed against spatialdata-plot v0.4.1; committed with outputs. Adds the
examples gallery card + toctree + thumbnail. Closes P0.2 of the doc-coverage
analysis.

Note: this notebook downloads ~3.6 GB (the Xenium zarr). Consider excluding it
from the weekly execute-all cron, or gating it, to keep CI light.
@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

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

Built from a059b90; redeployed on every push.

github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
…datashader), demo cbrt, add download/CI + coordinate-units notes
github-actions Bot pushed a commit that referenced this pull request Aug 19, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 19, 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