dataset <-
sample.data.environment %>%
filter_Date(end = "2023-08-29") %>%
dplyr::mutate(MEDI = dplyr::case_when(
Id == "Environment" ~ -MEDI,
.default = MEDI))
#basic application where transformation, breaks and labels are set manually
dataset %>%
gg_day(aes_col = Id) +
ggplot2::scale_y_continuous(
trans = "symlog")
#the same plot, but with breaks and labels set manually
dataset %>%
gg_day(aes_col = Id) +
ggplot2::scale_y_continuous(
trans = "symlog",
breaks = c(-10^(5:0), 0, 10^(0:5)),
labels = function(x) format(x, scientific = FALSE, big.mark = " "))
#setting individual arguments of the symlog function manually allows
#e.g., to emphasize values smaller than 1
dataset %>%
gg_day(aes_col = Id) +
ggplot2::scale_y_continuous(
trans = symlog_trans(thr = 0.01),
breaks = c(-10^(5:-1), 0, 10^(-1:5)),
labels = function(x) format(x, scientific = FALSE, big.mark = " "))
Run the code above in your browser using DataLab