plothalfviolin_withthres: Plot Half Violin with Thresholds

View source: R/plothalfviolin_withthres.R

plothalfviolin_withthresR Documentation

Plot Half Violin with Thresholds

Description

This function creates a half violin plot with thresholds using ggplot2.

Usage

plothalfviolin_withthres(
  data,
  x_var,
  y_var,
  summaryfn_var = "median",
  fill_var,
  dodge_width = 0.8,
  color_palette = c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00",
    "#CC79A7"),
  facetformula_var,
  title_var,
  thres_var,
  perc_var,
  perclabelx = 1,
  labelsize = 6,
  basesize_var = 18,
  nudge_var = 0.5
)

Arguments

data

A data frame containing the variables used for plotting.

x_var

The variable name for the x-axis.

y_var

The variable name for the y-axis.

fill_var

The variable name for the fill color.

dodge_width

The width of the dodge for grouped violins (default = 0.8).

color_palette

A vector of colors to use for the plot (default = cbbPalette).

facetformula_var

The formula specifying the faceting variables.

title_var

The title for the plot.

thres_var

The variable name for the threshold.

perc_var

The variable name for the percentage label.

perclabelx

The x-coordinate adjustment for the percentage label (default = 1).

labelsize

The font size for the percentage label (default = 6).

basesize_var

The base font size for the plot (default = 18).

facet_strvar

The variable name for facet labels.

facet_var

The variable name for faceting (optional).

Value

A ggplot object representing the half violin plot with thresholds.


chris-hsiung/bears01 documentation built on April 9, 2024, 2:01 a.m.