# Multiple variables
df <- lapply(seq(2), function(x) runif(10))
df <- as.data.frame(df)
df[, 3] <- runif(10, 1, 2)
colnames(df) <- paste0("X", seq(3))
plot_violin(
df,
title = "Some numerical variables",
colour = brewer.pal(9, "Set1")[seq(3)]
)
# Advanced parameters
plot_violin(
df,
title = "Some numerical variables",
color_title = brewer.pal(9, "Set1")[5],
ylab = "Y-values",
colour = brewer.pal(9, "Set1")[seq(3)],
method = "kruskal",
method_adjust = "none",
cex = 1.2,
pch_size = 3,
width_text = 5,
pch_colour = "gray30",
pch_alpha = 0.5,
width_title = 30,
lwd = 1.25,
digits = 2
)
# Advanced parameters
plot_histogram(
x,
title = "Some numerical variable",
width_title = 15,
color = "blue",
color_title = "orange",
color_stats = "orange",
cex = 1.2,
digits = 1,
binwidth = 0.5
)# Default parameters
x <- runif(10, 1, 10) %>%
set_names(paste("Sample", LETTERS[seq(10)]))
plot_bar(x)# Advanced parameters
plot_bar(
x = x,
title = "Some numerical variable",
width_title = 30,
colour = c("yellow", "gray", "red"),
color_title = "blue",
cex = 1.2,
digits = 1,
n_max = 5,
ratio = 15,
hjust_title = 1
)# Advanced parameters
k <- 10
n <- runif(k, 1, 10) %>% round()
x <- paste("Level", seq(k)) %>%
mapply(function(x, y) rep(x, y), ., n) %>%
unlist()
plot_pie(
x,
title = "Some categorical variable",
width_text = 20,
width_title = 20,
colour = rev(brewer.pal(9, "Reds")),
cex = 20,
digits = 1,
hsize = 1.5,
collapse = TRUE,
b = 3
)# Default parameters
df <- sapply(seq(10), function(x) runif(10) %>% round()) %>% as.data.frame()
colnames(df) <- paste("Level", seq(10))
plot_bar_mcat(df)# Advanced parameters
plot_bar_mcat(
df,
sample_size = 15,
title = "Some categorical variable",
width_text = 30,
width_title = 50,
colour = brewer.pal(9, "Reds"),
color_title = "red",
cex = 8,
digits = 1,
collapse = TRUE,
ratio = 2,
n_collapse = 3,
n_max = 4,
hjust_title = 1
)#> R version 4.6.0 (2026-04-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.4 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] magrittr_2.0.5 RColorBrewer_1.1-3 GimmeMyPlot_0.2.0 rmarkdown_2.31
#>
#> loaded via a namespace (and not attached):
#> [1] sass_0.4.10 generics_0.1.4 tidyr_1.3.2 rstatix_0.7.3
#> [5] stringi_1.8.7 digest_0.6.39 evaluate_1.0.5 grid_4.6.0
#> [9] fastmap_1.2.0 jsonlite_2.0.0 backports_1.5.1 Formula_1.2-5
#> [13] purrr_1.2.2 scales_1.4.0 tweenr_2.0.3 jquerylib_0.1.4
#> [17] abind_1.4-8 cli_3.6.6 rlang_1.2.0 polyclip_1.10-7
#> [21] withr_3.0.2 cachem_1.1.0 yaml_2.3.12 tools_4.6.0
#> [25] ggsignif_0.6.4 dplyr_1.2.1 ggplot2_4.0.3 ggpubr_0.6.3
#> [29] forcats_1.0.1 broom_1.0.12 buildtools_1.0.0 vctrs_0.7.3
#> [33] R6_2.6.1 lifecycle_1.0.5 stringr_1.6.0 car_3.1-5
#> [37] MASS_7.3-65 pkgconfig_2.0.3 pillar_1.11.1 bslib_0.10.0
#> [41] gtable_0.3.6 glue_1.8.1 ggforce_0.5.0 xfun_0.57
#> [45] tibble_3.3.1 tidyselect_1.2.1 sys_3.4.3 knitr_1.51
#> [49] farver_2.1.2 htmltools_0.5.9 labeling_0.4.3 carData_3.0-6
#> [53] maketools_1.3.2 compiler_4.6.0 S7_0.2.2