Plotting API


See the Settings section for all important plotting configurations.


pl.scatter(adata[, x, y, color, use_raw, …])

Scatter plot along observations or variables axes.

pl.heatmap(adata, var_names, groupby[, …])


pl.dotplot(adata, var_names, groupby[, …])


pl.tracksplot(adata, var_names, groupby[, …])

In this type of plot each var_name is plotted as a filled line plot where the y values correspond to the var_name values and x is each of the cells.

pl.violin(adata, keys[, groupby, log, …])


pl.stacked_violin(adata, var_names, groupby)


pl.matrixplot(adata, var_names, groupby[, …])


pl.clustermap(adata[, obs_keys, use_raw, …])

Hierarchically-clustered heatmap.

pl.ranking(adata, attr, keys[, dictionary, …])

Plot rankings.

pl.dendrogram(adata, groupby, *[, …])

Plots a dendrogram of the categories defined in groupby.


These classes allow fine tuning of visual parameters.

pl.DotPlot(adata, var_names, groupby[, …])

Allows the visualization of two values that are encoded as dot size and color.

pl.MatrixPlot(adata, var_names, groupby[, …])

Allows the visualization of values using a color map.

pl.StackedViolin(adata, var_names, groupby)

Stacked violin plots.


Methods for visualizing quality control and results of preprocessing functions.

pl.highest_expr_genes(adata[, n_top, show, …])

Fraction of counts assigned to each gene over all cells.

pl.filter_genes_dispersion(result[, log, …])

Plot dispersions versus means for genes.

pl.highly_variable_genes(adata_or_result[, …])

Plot dispersions or normalized variance versus means for genes.


Methods that extract and visualize tool-specific annotation in an AnnData object. For any method in module tl, there is a method with the same name in pl.


pl.pca(adata, *[, color, gene_symbols, …])

Scatter plot in PCA coordinates.

pl.pca_loadings(adata[, components, …])

Rank genes according to contributions to PCs.

pl.pca_variance_ratio(adata[, n_pcs, log, …])

Plot the variance ratio.

pl.pca_overview(adata, **params)

Plot PCA results.


pl.tsne(adata, *[, color, gene_symbols, …])

Scatter plot in tSNE basis.

pl.umap(adata, *[, color, gene_symbols, …])

Scatter plot in UMAP basis.

pl.diffmap(adata, *[, color, gene_symbols, …])

Scatter plot in Diffusion Map basis.

pl.draw_graph(adata, *[, color, …])

Scatter plot in graph-drawing basis.

pl.spatial(adata, *[, color, gene_symbols, …])

Scatter plot in spatial coordinates.

pl.embedding(adata, basis, *[, color, …])

Scatter plot for user specified embedding basis (e.g.

Compute densities on embeddings.

pl.embedding_density(adata[, basis, key, …])

Plot the density of cells in an embedding (per condition).

Branching trajectories and pseudotime, clustering

Visualize clusters using one of the embedding methods passing color='louvain'.

pl.dpt_groups_pseudotime(adata[, color_map, …])

Plot groups and pseudotime.

pl.dpt_timeseries(adata[, color_map, show, …])

Heatmap of pseudotime series.

pl.paga(adata[, threshold, color, layout, …])

Plot the PAGA graph through thresholding low-connectivity edges.

pl.paga_path(adata, nodes, keys[, use_raw, …])

Gene expression and annotation changes along paths in the abstracted graph.

pl.paga_compare(adata[, basis, edges, …])

Scatter and PAGA graph side-by-side.

Marker genes

pl.rank_genes_groups(adata[, groups, …])

Plot ranking of genes.

pl.rank_genes_groups_violin(adata[, groups, …])

Plot ranking of genes for all tested comparisons.

pl.rank_genes_groups_stacked_violin(adata[, …])


pl.rank_genes_groups_heatmap(adata[, …])


pl.rank_genes_groups_dotplot(adata[, …])


pl.rank_genes_groups_matrixplot(adata[, …])


pl.rank_genes_groups_tracksplot(adata[, …])

Plot ranking of genes using heatmap plot (see heatmap())


pl.sim(adata[, tmax_realization, …])

Plot results of simulation.