hypo_legend_flag_single combines several single flag legend elements

hypo_legend_flag_single(
  geo,
  color_map,
  flag_lwd = 1,
  flag_line_color = NA,
  flag_radius_scale = 1,
  circle_color = NA,
  circle_lwd = 0.5,
  plot_names = FALSE,
  plot_name_size = 3,
  font_family = "sans",
  plot = TRUE
)

Arguments

geo

string skalar (manatory), one of the available flag IDs

color_map

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

flag_lwd

numeric skalar (optional), line width of the optional frame of the flag annotation

flag_line_color

color skalar (a string, optional), line width of the optional frame of the flag annotation

flag_radius_scale

numeric skalar (optional), scaling of the optional flag annotation frames diameter

circle_color

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

circle_lwd

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

plot_names

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

plot_name_size

numeric skalar (optional), the species label size

font_family

string skalar (optional), the species label font family

plot

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

Details

The function hypo_legend_flag_single constructs a single flag legend from a vector of flag IDs and a choosen color map (matching in length).

Flag labels can optionally be included.

See also

Examples

clr <- RColorBrewer::brewer.pal(3,'Oranges') left_flag <- c('anguilla','barbados','trinidad_and_tobago') hypo_legend_flag_single(geo = left_flag, flag_lwd = 1, flag_line_color = 'black', flag_radius_scale = 1, color_map = clr, circle_color = 'black', plot_names = TRUE)