Package 'ggflags'

Title: Plot flags of the world in ggplot2
Description: A ggplot2 extension that allows you to plot the flags of the world. It functions essentially as geom_point does, requiring, at minimum, a two-letter lowercase country code for the country aesthetic, and x and y aesthetics. You can also adjust the size.
Authors: Baptiste Auguie [aut, cre], James Goldie [aut, ctb] , Rémi Thériault [aut, ctb] (<https://orcid.org/0000-0003-4315-6788>, @rempsyc)
Maintainer: Baptiste Auguie <[email protected]>
License: GPL (>= 3)
Version: 0.0.4
Built: 2024-09-22 02:45:11 UTC
Source: https://github.com/jimjam-slam/ggflags

Help Index


flag geom for ggplot2

Description

flag geom for ggplot2

Usage

geom_flag(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

mapping

data

data

stat

stat

position

position

na.rm

na.rm

show.legend

show.legend

inherit.aes

inherit.aes

...

...

Examples

data(lflags)
set.seed(1234)
d <- data.frame(
  x = rnorm(10), y = rnorm(10),
  country = sample(c("ar", "fr"), 10, TRUE),
  stringsAsFactors = FALSE
)
ggplot2::ggplot(d, ggplot2::aes(x = x, y = y, country = country, size = x)) +
  geom_flag() +
  scale_country()

List of country flags

Description

List of country flags

Usage

lflags

Format

A list of 256 elements of class S4 ('grImport::Picture'), with:

content

PictureGroup

defs

PictureDefinitions

summary

PictureSummary

...


scale countries

Description

scale countries

Usage

scale_country(..., guide = "legend")

Arguments

...

...

guide

guide