hypo_anno_flag: Add a flag to a ggplot

View source: R/hypoimg_flags.R

hypo_anno_flagR Documentation

Add a flag to a ggplot

Description

hypo_anno_flag adds a left facing hamlet annotation to a ggplot.

Usage

hypo_anno_flag(geo, xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf, ...)

Arguments

geo

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

xmin

numeric skalar (optional), left boundary of the annotation

xmax

numeric skalar (optional), right boundary of the annotation

ymin

numeric skalar (optional), lower boundary of the annotation

ymax

numeric skalar (optional), upper boundary of the annotation

...

catch all parameter to allow excess parameter through purrr::pmap

Details

Hypogen comes with a set of illustrations of flags of the countries adjacent to the Caribbean and the Golf of Mexico. The function hypo_anno_flag uses the ggplot2::annotation_custom() function to add a single flag to an existring ggplot.

See Also

hypo_flag_palette, hypo_anno_l, hypo_anno_r

Examples

ggplot(tibble(x = 1, y = 1), aes(x = x, y = y))+
  geom_point()+
  hypo_anno_flag('mexico', xmax = 1.2, ymax = 1.2)+
  coord_cartesian(xlim = c(0, 2), ylim = c(0, 2))


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