scplotkit#
A pile of plotting functions for single-cell analysis, built on top of scanpy and AnnData, bundled up so they don’t have to be rewritten for every new project.
Masked and highlighted embeddings, gene co-expression blends, compositional
bar plots and heatmaps, dataset overview panels, marker-gene matrix/violin
plots, Sankeys/sunbursts/treemaps over annotation hierarchies — all styled
consistently through a single PlotConfig and saved to disk
with one call. Nothing statistical, no new analysis, just the plots. PRs for
your own favorite single-cell (or spatial) plots are very welcome.
Contents
At a glance#
import scanpy as sc
import scplotkit as spk
adata = sc.read_h5ad("my_atlas.h5ad")
plotter = spk.ScPlotter(output_dir="figures")
plotter.masked_umap(adata, color_by="cell_type", mask_values=["CD4 T", "CD8 T"], figure_name="Lymphocytes")
plotter.stacked_barplots(adata, level_column="cell_type", sample_column="sample_id")
See the Embeddings and the four notebooks that follow it for a walkthrough and demonstration of major plotting functions, or the API Reference for the complete function reference.