label_species: Species facet labellers

View source: R/ggstrat-labels.R

label_speciesR Documentation

Species facet labellers

Description

Use these to label species with partial italic formatting. See label_parsed.

Usage

label_species(
  labels,
  dont_italicize = c("\\(.*?\\)", "spp?\\.", "-complex", "[Oo]ther"),
  species_facet = 1,
  multi_line = TRUE
)

Arguments

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

Value

A ggplot2::labeller()

Examples


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)")


paleolimbot/tidypaleo documentation built on Jan. 25, 2023, 2:43 a.m.