Cellestial
The Grammar of Graphics for single-cell omics.
Cellestial is an interactive and a highly customizable Single-Cell & Spatial omics data visualization library. Built on top Lets-Plot, it offers a ggplot-like layered and modular approach offering high customizability and publication-ready figures.
Cellestial is highly integrated with scverse's AnnData with room for integration with any upcoming single-cell omics data type in the Python single-cell omics ecosystem.
Cellestial leverages the performance of Polars ensuring speed and scalability.
Installation
pip install cellestial
uv add cellestial
poetry add cellestial
To plot SpatialData objects, install the spatial extra, e.g. pip install "cellestial[spatial]".
Quickstart
Cellestial accepts a standard AnnData directly. The same function plots a categorical column or a gene, and everything composes through + like ggplot.
from ggrust import *
import cellestial as cl
data = cl.datasets.pbmc3k(cache_directory="data")
cl.umap(
data,
key="cell_type_lvl1",
axis_type="arrow",
legend_ondata=True,
) + scale_color_hue()
Examples
Spatial omics
Overlay categorical labels or gene expression on tissue coordinates.
Show code
import squidpy as sq
lymph_node = cl.datasets.human_lymph_node(cache_directory="data")
hne = sq.datasets.visium_hne_adata()
gggrid(
[
cl.spatial(lymph_node, key="clusters"),
cl.spatial(hne, key="leiden"),
],
ncol=2,
) + ggsize(1000, 400)
Dimensionality reduction with layers
Cellestial ships single-cell-specific layers (cluster_outlines, stream, arrow_axis, ondata_legend) that compose with + like any geom.
Show code
velocity_data = cl.datasets.pancreas(cache_directory="data")
outlined = cl.umap(
data,
key="cell_type_lvl1",
axis_type="arrow",
size=1.5,
legend_ondata=True,
) + scale_color_hue() + cl.cluster_outlines(groups=["Lymphocytes", "B Cells"])
streamed = cl.umap(
velocity_data,
key="clusters_coarse",
axis_type="arrow",
size=4,
alpha=0.4,
legend_ondata=True,
ondata_color="black",
) + cl.stream()
gggrid([outlined, streamed])
Marker genes
Heatmaps, dotplots, matrixplots and stacked violins share the same call shape and ship with built-in dendrograms and group bars.
Show code
markers = [
"PSAP", "LYZ", "CST3", # Monocytes
"CD79A", "CD79B", # B cells
"IL7R", "CD3D", "CD3E", "CD4", # T cells (CD4+)
"CD8A", "CD8B", # T cells (CD8+)
"NKG7", "GNLY", "KLRD1", # NK cells
"HLA-DRA", "FCER1A", # Dendritic cells
]
cl.heatmap(
data,
group_by="cell_type_lvl1",
keys=markers,
geom="raster",
group_lines_size=0.5,
group_lines_color="white",
group_bars=True,
group_bars_labels=True,
dendrogram=True,
dendrogram_size=1,
) + scale_fill_viridis()
Statistical comparisons
cl.bracket runs pairwise tests on a cl.boxplot or cl.violin and draws annotated significance brackets.
Show code
cl.boxplot(
data,
key="CD3D",
fill="cell_type_lvl1",
threshold=0.1,
) + scale_fill_hue() + cl.bracket(
y_padding=0.2,
label="pvalue",
comparisons=[
("Lymphocytes", "Monocytes"),
("Monocytes", "Erythroid"),
("Monocytes", "B Cells"),
],
)
Ridge plots
Quick exploratory views of expression distributions across groups.
Show code
cl.ridge(
data,
key="B2M",
alpha=0.6,
group_by="cell_type_lvl1",
) + scale_fill_hue()
Migrating from Scanpy
Cellestial mirrors most of scanpy.pl with a few naming shifts:
color=becomeskey=.- Multi-panel calls use a plural function (
cl.umaps,cl.violins, ...). groupbybecomesgroup_by,var_namesbecomeskeys.- Saving is a separate
cl.save(plot, "umap.png")call.
See the migration guide for a side-by-side mapping.
Documentation
- Quickstart — guided tour of the API.
- Features — tooltips, layers, grids, colors, faceting.
- API reference — every function.
- Migrating from Scanpy.
Citation
If you use Cellestial, please cite:
@misc{https://doi.org/10.5281/zenodo.21710312,
doi = {10.5281/ZENODO.21710312},
url = {https://zenodo.org/doi/10.5281/zenodo.21710312},
author = {Kosar, Zafer},
title = {Cellestial: A grammar of graphics for single-cell omics},
publisher = {Zenodo},
year = {2026},
copyright = {Apache License 2.0}
}
License
Apache 2.0. See LICENSE.
Metadata
Release files for cellestial 0.62.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cellestial-0.62.0.tar.gz | 133.5 kB | With provenance | Details for cellestial-0.62.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cellestial-0.62.0-py3-none-any.whl | Python 3 | none | any | Details for cellestial-0.62.0-py3-none-any.whl |
Total release size: 323.8 kB
Release files / cellestial-0.62.0.tar.gz
| Download URL | cellestial-0.62.0.tar.gz |
|---|---|
| Size | 133.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
318803771ad24394804873f17d99ad58b243ad641d216d7d6c6436db2567714b
|
|
BLAKE2b-256 checksum How to use checksums |
8dfe1815bfd5583eb5c1391e2a3ea6c779f5d988e40337dafd4b5caef7027e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / cellestial-0.62.0-py3-none-any.whl
| Download URL | cellestial-0.62.0-py3-none-any.whl |
|---|---|
| Size | 190.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d1459c92c000724fd3a8a4b6e0f03b80fe0b7af8b58d39a50f0f6be696f37c4
|
|
BLAKE2b-256 checksum How to use checksums |
4cc65ee1ad177d11f2babef3c899b744ee41013a21b5be5cbef230458fcfd9a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for cellestial 0.62.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cellestial-0.62.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.