Plotting: pl
#
The plotting module scanpy.pl
largely parallels the tl.*
and a few of the pp.*
functions.
For most tools and for some preprocessing functions, you’ll find a plotting function with the same name.
See Core plotting functions for an overview of how to use these functions.
Note
See the Settings section for all important plotting configurations.
Generic#
Scatter plot along observations or variables axes. |
|
Heatmap of the expression values of genes. |
|
Makes a dot plot of the expression values of |
|
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. |
|
Violin plot. |
|
Stacked violin plots. |
|
Creates a heatmap of the mean expression values per group of each var_names. |
|
Hierarchically-clustered heatmap. |
|
Plot rankings. |
|
Plots a dendrogram of the categories defined in |
Classes#
These classes allow fine tuning of visual parameters.
Allows the visualization of two values that are encoded as dot size and color. |
|
Allows the visualization of values using a color map. |
|
Stacked violin plots. |
Preprocessing#
Methods for visualizing quality control and results of preprocessing functions.
Fraction of counts assigned to each gene over all cells. |
|
Plot dispersions versus means for genes. |
|
Plot dispersions or normalized variance versus means for genes. |
|
Plot histogram of doublet scores for observed transcriptomes and simulated doublets. |
Tools#
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
.
PCA#
Scatter plot in PCA coordinates. |
|
Rank genes according to contributions to PCs. |
|
Plot the variance ratio. |
|
Plot PCA results. |
Embeddings#
Scatter plot in tSNE basis. |
|
Scatter plot in UMAP basis. |
|
Scatter plot in Diffusion Map basis. |
|
Scatter plot in graph-drawing basis. |
|
Scatter plot in spatial coordinates. |
|
Scatter plot for user specified embedding basis (e.g. umap, pca, etc). |
Compute densities on embeddings.
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'
.
Plot groups and pseudotime. |
|
Heatmap of pseudotime series. |
|
Plot the PAGA graph through thresholding low-connectivity edges. |
|
Gene expression and annotation changes along paths in the abstracted graph. |
|
Scatter and PAGA graph side-by-side. |
Marker genes#
Plot ranking of genes. |
|
Plot ranking of genes for all tested comparisons. |
|
Plot ranking of genes using stacked_violin plot (see |
|
Plot ranking of genes using heatmap plot (see |
|
Plot ranking of genes using dotplot plot (see |
|
Plot ranking of genes using matrixplot plot (see |
|
Plot ranking of genes using heatmap plot (see |
Simulations#
Plot results of simulation. |