dviolin_plot: Create density-based violin plot

Description Usage Arguments Details Input matrix X should be a data frame with

Description

Create density-based violin plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
dviolin_plot(
  X = data.frame(x = rnorm(50, mean = 10, sd = 1), y = rep(1:2, times = 25)),
  values = "x",
  category = "y",
  na.rm = TRUE,
  bw = "SJ",
  violin_width = 0.8,
  violin_end_width = 0.005,
  equal_width = TRUE,
  box_width = 0.03,
  box_col = "black",
  show_outliers = FALSE,
  pch = 1,
  boxplot_range = 1.5,
  trim = TRUE,
  value_limits,
  value_label = "",
  title = main,
  show_title = show_main,
  main = "Violin Plot",
  show_main = TRUE,
  title_gp = grid::gpar(fontface = "bold"),
  category_gp = grid::gpar(cex = cex),
  category_limits,
  category_label = "",
  category_names,
  show_n = TRUE,
  n_prefix = "",
  n_sep = "",
  n_gp = grid::gpar(cex = cex),
  median_col = "white",
  show_means = FALSE,
  mean_pch = 19,
  mean_pch_col = "yellow",
  summary_function = median,
  max.colors = 50,
  color_by = NULL,
  density.color.high = "yellow",
  density.color.mid = "darkgreen",
  density.color.low = "blue",
  label_colors = NULL,
  label.color.high = "red",
  label.color.low = "blue",
  newpage = FALSE,
  order_summary = median,
  grand_summary = NULL,
  grand_summary_gp = grid::gpar(lty = 2),
  cex = 0.75,
  show_boxplots = TRUE,
  show_violins = TRUE,
  draw = FALSE,
  desc = TRUE,
  ...
)

Arguments

...

Details

Based on the code from plotrix v3.6-5

Input matrix X should be a data frame with

X$category X$values X$labels (optional, if color_by is "label") The defaults are changed: bw=0.35 changed to "SJ", a recommended density bandwidth selector other options: bw= c("nrd0","nrd","ucv","bcv","SJ")


steveneschrich/densityplots documentation built on Dec. 23, 2021, 5:32 a.m.