hypo_legend_single: Constructs a legend of single hamlets

View source: R/hypoimg_basics.R

hypo_legend_singleR Documentation

Constructs a legend of single hamlets

Description

hypo_legend_single combines several single hamlet legend elements

Usage

hypo_legend_single(
  species,
  color_map,
  circle_color = NA,
  circle_lwd = 0.5,
  plot_names = FALSE,
  plot_name_size = 3,
  font_family = "sans",
  ncol = 1,
  plot = TRUE
)

Arguments

species

string vector (manatory), can only contain available species

color_map

color vector (a string, optional), the color map (must match the species vector in length)

circle_color

color scalar (a string, optional), the color of the background circle outline

circle_lwd

numeric scalar (optional), the width of the background circle outlines

plot_names

logical scalar (optional), should the species label be added?

plot_name_size

numeric scalar (optional), the species label size

font_family

string scalar (optional), the species label font family

ncol

integer, number of columns

plot

logical scalar (optional), toggle the output to be either a plot or a list of plots

Details

The function hypo_legend_single constructs a single hamlet legend from a vector of hamlet species and a choosen color map (matching in length).

Hamlet species labels can optionally be included.

Available species: "aberrans", "atlahua", "castroaguirrei", "chlorurus", "ecosur", "floridae", "gemma", "gummigutta", "guttavarius", "indigo", "liberte", "maculiferus", "maya", "nigricans", "providencianus", "puella", "randallorum", "tan", "unicolor"

See Also

hypo_legend_pair, hypo_legend_flag_single

Examples

clr_single <- viridis::inferno(4)

species <- c('unicolor', 'liberte', 'maya', 'castroaguirrei')

hypo_legend_single(species = species, color_map = clr_single,
  circle_color = 'black', plot_names = TRUE)


k-hench/hypoimg documentation built on June 2, 2022, 1:49 a.m.