| select(-idc) | select(-idc) | ||||
| } | } | ||||
| plot_data <- function(x, title = "") { | |||||
| plot_data <- function(x, title = "", title_size = 20) { | |||||
| if (!"alpha" %in% colnames(x)) x$alpha <- 1 | if (!"alpha" %in% colnames(x)) x$alpha <- 1 | ||||
| if (!".text_color" %in% colnames(x)) x$`.text_color` <- "white" | if (!".text_color" %in% colnames(x)) x$`.text_color` <- "white" | ||||
| if (!".text_size" %in% colnames(x)) x$`.text_size` <- 12 | if (!".text_size" %in% colnames(x)) x$`.text_size` <- 12 | ||||
| coord_equal() + | coord_equal() + | ||||
| ggtitle(title) + | ggtitle(title) + | ||||
| theme_void() + | theme_void() + | ||||
| theme(plot.title = element_text(family = "Fira Mono", hjust = 0.5, size = 24)) + | |||||
| theme(plot.title = element_text(family = "Fira Mono", hjust = 0.5, size = title_size)) + | |||||
| guides(fill = FALSE) | guides(fill = FALSE) | ||||
| } | } | ||||