Skip to contents

Provides basic ggplot2 graph with the following data on it :

lex

the total life expectancy (black dotted)

lex_male

the male life expectancy (blue)

ley_female

the male life expectancy (red)

Usage

gph_lexgram(
  country,
  theme = ggplot2::theme_minimal(),
  men = "blue",
  women = "red",
  all = "black"
)

Arguments

country

A string with the country name

theme

A ggplot2 theme

men

Color for men line

women

Color for women line

all

Color for average line

Value

A ggplot2 graph

Examples

gph_lexgram("Switzerland")
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_line()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_line()`).
#> Warning: Removed 1 row containing missing values or values outside the scale range
#> (`geom_line()`).