Skip to content

Commit c2c4644

Browse files
committed
docs: add example for Box/Violin plot for CellStatPlot
1 parent be053ca commit c2c4644

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

R/cellstatplot.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@
144144
#' pr <- CellStatPlot(ifnb_sub, plot_type = "radar", group_by = "stim")
145145
#' ps <- CellStatPlot(ifnb_sub, plot_type = "spider", group_by = "stim")
146146
#' pr | ps
147+
#'
148+
#' # Box/Violin plot
149+
#' ifnb_sub$group <- sample(paste0("g", 1:10), nrow(ifnb_sub), replace = TRUE)
150+
#' CellStatPlot(ifnb_sub, group_by = c("group", "stim"), frac = "group",
151+
#' plot_type = "violin", add_box = TRUE, ident = "seurat_annotations",
152+
#' x_text_angle = 60, comparisons = TRUE, aspect.ratio = 0.8)
147153
#' }
148154
CellStatPlot <- function(
149155
object, ident = "seurat_clusters", group_by = NULL, group_by_sep = "_",

man/CellStatPlot.Rd

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)