Intro Thoughts

Status Quo

library(tidyverse)
library(tidyplots)
## Warning: package 'tidyplots' was built under R version 4.4.1

Experiment

tidyplots::energy |>
  tidyplot(x = energy_type, color = energy_source) |>
  add_count_bar()

tidyplots::energy |>
  tidyplot(x = energy_type, y = energy) |>
  add_mean_bar() |>
  add_data_points_beeswarm(color = "black")

last_plot() + 
  ggchalkboard::theme_chalkboard(base_size = 4)

tidyplots::energy |>
  tidyplot(color = energy_type) |>
  add_donut()

last_plot() + 
  aes(alpha = energy_type)
## Warning: Using alpha for a discrete variable is not advised.

add_donut
## function (plot, width = 1, reverse = FALSE, ...) 
## {
##     plot <- check_tidyplot(plot)
##     plot <- style_void(remove_padding(plot))
##     if (!is_missing(plot, "x")) 
##         cli::cli_abort("{.fun add_pie} and {.fun add_donut} accept {.arg color} and {.arg y}, but not {.arg x}.")
##     if (is_missing(plot, "y")) {
##         plot <- plot + ggplot2::geom_bar(ggplot2::aes(x = NA), 
##             position = ggplot2::position_stack(reverse = reverse), 
##             width = width, color = NA, ...) + ggplot2::ggtitle("count")
##     }
##     else {
##         plot <- plot + ggplot2::stat_summary(ggplot2::aes(x = NA), 
##             geom = "bar", fun = sum, position = ggplot2::position_stack(reverse = reverse), 
##             width = width, color = NA, ...) + ggplot2::ggtitle(get_variable(plot, 
##             "y"))
##     }
##     suppressMessages(plot <- plot + ggplot2::coord_polar("y") + 
##         ggplot2::guides())
##     if (.type == "donut") 
##         suppressMessages(plot + ggplot2::scale_x_discrete(limits = function(x) c("", 
##             "", x)))
##     else plot
## }
## <bytecode: 0x7fe5bd0adb68>
## <environment: 0x7fe5bd0a8c88>
tidyplots::gene_expression |>
  tidyplot(color = group) |>
  add_donut()

Closing remarks, Other Relevant Work, Caveats