Use these to label species with partial italic formatting. See label_parsed.
label_species(
labels,
dont_italicize = c("\\(.*?\\)", "spp?\\.", "-complex", "[Oo]ther"),
species_facet = 1,
multi_line = TRUE
)
A data.frame of facet label values
Regular expressions that should not be italicized
Which facet(s) contain species values
See label_parsed
library(ggplot2)
ggplot(keji_lakes_plottable, aes(x = rel_abund, y = depth)) +
geom_col_segsh() +
scale_y_reverse() +
facet_grid(
cols = vars(taxon),
rows = vars(location),
scales = "free_x",
space = "free_x",
labeller = purrr::partial(label_species, species_facet = "taxon")
) +
labs(y = "Depth (cm)")