Set a global colour scheme for a series of plots.
global_colour_scheme.Rd
Set a global colour scheme for a series of plots.
Examples
asv <- system.file("extdata/tsv", "seqtab.tsv", package = "bubbler")
taxa <- system.file("extdata/tsv", "taxa.tsv", package = "bubbler")
rel_abund <- rel_abund_tsv(asv, taxa) %>% add_other()
rel_abund_l <- rel_abund %>%
subset_high_low(n = 10)
rel_abund_h <- rel_abund %>%
subset_high_low(n = 50, flip = TRUE)
unique_taxa <- extract_unique_taxa(rel_abund_l, rel_abund_h)
all_taxa <- rel_abund %>% all_taxa()
#> Warning: There was 1 warning in `dplyr::mutate()`.
#> ℹ In argument: `taxon = forcats::fct_reorder(taxon, mean)`.
#> Caused by warning:
#> ! `fct_reorder()` removing 1 missing value.
#> ℹ Use `.na_rm = TRUE` to silence this message.
#> ℹ Use `.na_rm = FALSE` to preserve NAs.
global_colour_scheme(all_taxa, unique_taxa)
#> Synergistota Actinomycetota Bacillota Bacteroidota Pseudomonadota
#> "#30123BFF" "#28BBECFF" "#A2FC3CFF" "#FB8022FF" "#7A0403FF"