Plotting functions#

Basic plotting#

draw_graph(adata[, graph_key, ax, width, ...])

Draw a networkx graph on an axes.

grouped_violinplot(ax, df, x, y[, cmap, ...])

Draw a grouped violinplot.

imshow(adata[, res, ax, tmp, title])

Show an image stored in adata.uns["spatial"].

plot_bin2d(data, x, y[, filt, subset, bins, ...])

Plot a 2D histogram of two features.

plot_fitline(x, y[, alternative, ax, color, ...])

Fit a linear model to the data and plot the fit line.

scatter(x, y[, color_by, ax, cmap, legend, ...])

Create a scatter plot of x vs y.

simple_violinplot(ax, df, y[, cmap, ...])

Draw a simple violinplot.

Special plotting#

elbow_plot(adata[, ndims, reduction, ax])

Create an elbow plot for a dimensionality reduction method.

moran_plot(adata, feature[, graph_name, ...])

Create a Moran scatter plot.

plot_barcode_data(adata, y[, x, obsm, ncol, ...])

Plot barcode data from adata.obs or adata.obsm.

plot_barcode_histogram(adata, feature[, ...])

Create a histogram of the number of barcodes per feature.

plot_barcodes_bin2d(adata, *args, **kwargs)

Plot barcode features in a 2D histogram.

plot_correlogram(adata[, graph_name, ...])

Plot a correlogram of spatial autocorrelation.

plot_dim_loadings(adata, components[, ncol, ...])

Plot the loadings of a dimensionality reduction method.

plot_expression(adata, gene[, y, obsm, ax])

Plot expression of genes in adata.

plot_features_bin2d(adata, *args, **kwargs)

Plot gene features in a 2D histogram.

plot_features_histogram(adata, features[, ...])

plot_local_result(adata, obsm, features, ...)

Plot local results from the adata.obsm.

plot_moran_mc(adata, feature[, graph_name, ...])

Plots simulated Moran's I values for a feature or features.

plot_pca(adata[, ndim, cmap, color_by, ...])

Create a PCA plot of the fist ndim dimensions.

plot_spatial_feature(adata, features[, ...])

Plot spatial features.

spatial_reduced_dim(adata, dimred, ...)

Plot spatially reduced dimensions.

Helper functions#

configure_subplots(nplots[, ncol])

Configure subplots for a given number of plots.

configure_violins(violins[, cmap, ...])

Configure the violins in a violinplot.

contour_plot(ax, x, y[, data, shape, ...])

Create a contour plot.

plot_single_barcode_data(adata, y[, x, ...])

Plot barcode data on a single axis.

subplots_single_colorbar([nplot, ncol, ...])

Create a figure with subplots and a single colorbar.