lexis_age {LexisPlotR} | R Documentation |
Emphasize a certain age in Lexis grid
Description
Add a coloured rectangle to an existing Lexis grid to highlight a certain age in that Lexis grid.
Usage
lexis_age(lg, age, delta = 1, fill = lexisplotr_colours()[1],
alpha = 0.7)
Arguments
lg |
an existing object originally created with |
age |
numeric, set the age to highlight. |
delta |
numeric, set the size of the age groups. Default is 1. |
fill |
character, set colour to fill the rectangle. |
alpha |
numeric, set alpha, the level of transparency for |
Details
Takes an existing Lexis grid and adds a coloured rectangle that highlights all triangles belonging to a certain age.
Value
A ggplot2 object.
Author(s)
Philipp Ottolinger
Examples
library(LexisPlotR)
lexis <- lexis_grid(year_start = 1900, year_end = 1905, age_start = 0, age_end = 5)
lexis <- lexis_age(lg = lexis, age = 3)
[Package LexisPlotR version 0.4.0 Index]