View source: R/Plotting_Statistics.R
| Proportion_Plot | R Documentation | 
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
)
| seurat_object | Seurat object name. | 
| plot_type | whether to plot a pie chart or bar chart; value must be one of  | 
| plot_scale | whether to plot bar chart as total cell counts or percents, value must be one of  | 
| group_by_var | |
| group.by | meta data column to classify samples (default = "ident" and will use  | 
| split.by | meta data variable to use to split plots. Default is NULL which will plot across entire object. | 
| num_columns | number of columns in plot.  Only valid if  | 
| x_lab_rotate | Rotate x-axis labels 45 degrees (Default is FALSE). Only valid if  | 
| colors_use | color palette to use for plotting. | 
| ggplot_default_colors | logical.  If  | 
| color_seed | random seed for the "varibow" palette shuffle if  | 
ggplot2 or patchwork object
#' library(Seurat)
Proportion_Plot(seurat_object = pbmc_small)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.