Plots the proportion of cells belonging to each identity in active.ident
of Seurat object.
Can plot either the totals or split by a variable in meta.data
.
Proportion_Plot(
seurat_object,
plot_type = "bar",
plot_scale = "percent",
group_by_var = deprecated(),
group.by = "ident",
split.by = NULL,
num_columns = NULL,
x_lab_rotate = TRUE,
colors_use = NULL,
ggplot_default_colors = FALSE,
color_seed = 123
)
ggplot2 or patchwork object
Seurat object name.
whether to plot a pie chart or bar chart; value must be one of "bar"
or "pie"
. Default
is "bar"
whether to plot bar chart as total cell counts or percents, value must be one of "percent"
or
"count"
. Default is "percent"
.
meta data column to classify samples (default = "ident" and will use active.ident
).
meta data variable to use to split plots. Default is NULL which will plot across entire object.
number of columns in plot. Only valid if split.by
is not NULL.
Rotate x-axis labels 45 degrees (Default is FALSE). Only valid if plot_type = "bar"
.
color palette to use for plotting.
logical. If colors_use = NULL
, Whether or not to return plot using
default ggplot2 "hue" palette instead of default "polychrome" or "varibow" palettes.
random seed for the "varibow" palette shuffle if colors_use = NULL
and number of
groups plotted is greater than 36. Default = 123.
#' library(Seurat)
Proportion_Plot(seurat_object = pbmc_small)
Run the code above in your browser using DataLab