1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 20:21:52 +02:00

(v2.1.1.9146) new scale_*_sir() functions

This commit is contained in:
2025-02-13 19:47:57 +01:00
parent 5ff9210c12
commit bd2887bcd4
16 changed files with 460 additions and 81 deletions

View File

@ -77,7 +77,7 @@
#' ggplot(df) +
#' geom_sir() +
#' scale_y_percent() +
#' scale_sir_colours() +
#' scale_sir_colours(aesthetics = "fill") +
#' labels_sir_count() +
#' theme_sir()
#' }
@ -121,7 +121,8 @@
#' ) %>%
#' ggplot() +
#' geom_col(aes(x = x, y = y, fill = z)) +
#' scale_sir_colours(Value4 = "S", Value5 = "I", Value6 = "R")
#' scale_sir_colours(aesthetics = "fill",
#' Value4 = "S", Value5 = "I", Value6 = "R")
#' }
#' if (require("ggplot2") && require("dplyr")) {
#' # resistance of ciprofloxacine per age group
@ -243,7 +244,7 @@ ggplot_sir <- function(data,
theme_sir()
if (fill == "interpretation") {
p <- p + scale_sir_colours(colours = colours)
p <- p + scale_sir_colours(aesthetics = "fill", colours = colours)
}
if (identical(position, "fill")) {