lexis_year {LexisPlotR} | R Documentation |
Emphasize a certain year in Lexis grid.
Description
Takes an existing Lexis grid and adds a coloured rectangle to highlight a certain age.
Usage
lexis_year(lg, year, delta = 1, fill = lexisplotr_colours()[2],
alpha = 0.7)
Arguments
lg |
an existing object originally created with |
year |
numeric, set the year to highlight. |
delta |
numeric, set the size of the age groups. Default is 1. |
fill |
character, set the colour of the rectangle. |
alpha |
numeric, set the transparency of the rectangle. Default is |
Details
Takes an existing Lexis grid and adds a coloured rectangle to the plot. The rectangle will highlight a certain year in the grid.
Value
A ggplot2 object.
Author(s)
Philipp Ottoliner
Examples
lg <- lexis_grid(year_start = 1900, year_end = 1905, age_start = 0, age_end = 5)
lexis_year(lg = lg, year = 1902)
[Package LexisPlotR version 0.4.0 Index]