#' plot violin
#'
#' Plot a violin plot
#'
#' @param df_ data frame
#' @param mode mode
#'
#' @return
#' @export
#'
#' @examples
plot_violin <- function(df_, mode=1) {
label_subtype <- NULL
mutations <- NULL
median <- NULL
. <- list()
status <- NULL
my_theme <- igfuns::my_theme()
my_colors_vh <- brewer.pal(n = 9, name = "Set1")
my_scale_fill_vh <- scale_fill_manual(values=my_colors_vh,
labels=paste0("IGHV", seq(7)))
ggplot(df_, aes(x=label_subtype, y=mutations, color=label_subtype)) +
geom_violin() +
my_theme +
geom_boxplot(width = 0.1, fill="black", outlier.color = NA) +
stat_summary(fun.y=median, geom="point", fill="white", shape=21, size=2.5) +
facet_grid(. ~ status)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.