powered by
Add a coloured rectangle to an existing Lexis grid to highlight a certain age in that Lexis grid.
lexis_age(lg, age, delta = 1, fill = lexisplotr_colours()[1], alpha = 0.7)
an existing object originally created with lexis_grid().
lexis_grid()
numeric, set the age to highlight.
numeric, set the size of the age groups. Default is 1.
character, set colour to fill the rectangle.
numeric, set alpha, the level of transparency for fill. Default is 0.5.
fill
0.5
A ggplot2 object.
Takes an existing Lexis grid and adds a coloured rectangle that highlights all triangles belonging to a certain age.
# NOT RUN { library(LexisPlotR) lexis <- lexis_grid(year_start = 1900, year_end = 1905, age_start = 0, age_end = 5) lexis <- lexis_age(lg = lexis, age = 3) # }
Run the code above in your browser using DataLab