distribution_plots.Rd
Generates violin plots, boxplots, or density plots of continuous variables in the spatial meta data or of gene expression to make comparisons across samples
distribution_plots(
x = NULL,
plot_meta = NULL,
genes = NULL,
samples = NULL,
data_type = "tr",
color_pal = "okabeito",
plot_type = "violin",
ptsize = 0.5,
ptalpha = 0.5
)
an STlist
vector of variables in x@spatial_meta
to plot distributions.
If 'total_counts', the function plots the counts per spot/cell. If 'total_genes',
the function plots the number of genes per spot/cell are plotted.
vector of genes to plot expression distribution
samples to include in the plot. Default (NULL) includes all samples
one of 'tr' or 'raw', to plot transformed or raw counts
a string of a color palette from khroma
or RColorBrewer
, or a
vector with colors
one of "violin", "box", or "density" (violin plots, box plots, or density plots respectively)
the size of points in the plots
the transparency of points (violin/box plot) or curves (density plots)
The function allows to visualize the distribution of spot/cell total counts, total genes, or expression of specific genes across all samples for comparative purposes.