hypo_legend_pair: Constructs a legend of paired hamlets

View source: R/hypoimg_basics.R

hypo_legend_pairR Documentation

Constructs a legend of paired hamlets

Description

hypo_legend_pair combines several paired hamlet legend elements

Usage

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

Arguments

left

string vector (manatory), can only contain available species

right

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_pair constructs a paired hamlet legend from two vectors 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_single, hypo_legend_flag_pair

Examples

clr <- viridis::viridis(4)

left <- c('unicolor', 'liberte', 'maya', 'castroaguirrei')
right <- c('guttavarius', 'gummigutta', 'atlahua', 'randallorum')

hypo_legend_pair(left= left, right = right, color_map = clr,
  circle_color = 'black', plot_names = TRUE)

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