View source: R/ggstrat-labels.R
| label_species | R Documentation | 
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
)
labels | 
 A data.frame of facet label values  | 
dont_italicize | 
 Regular expressions that should not be italicized  | 
species_facet | 
 Which facet(s) contain species values  | 
multi_line | 
 See label_parsed  | 
A ggplot2::labeller()
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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.