Learn R Programming

LexisPlotR (version 0.4.0)

lexis.grid: Deprecated. Plot a Lexis grid

Description

lexis.grid() plots the basic Lexis grid.

Usage

lexis.grid(year.start, year.end, age.start, age.end, lwd = 0.3,
  force.equal = T)

Arguments

year.start

integer, set the year the Lexis Diagram starts with.

year.end

integer, set the year the Lexis Diagram ends with.

age.start

integer, set the age the Lexis Diagram starts with.

age.end

integer, set the age the Lexis Diagram ends with.

lwd

numeric, set the linewidth of the grid.

force.equal

logical, by default lexis.grid uses ggplot2::coord_fixed() to ensure isosceles trianlges. Set FALSE to allow for a non-isosceles appearance.

Value

The functions returns a ggplot2-plot.

Details

The function determines the aspect ratio of the x- and y-axis to enforce isosceles triangles. The aspect ratio will not be effected by defining width and height in pdf() or other graphic devices.

Because the returned object is a ggplot2 graph, the overall appearence of the graph can be edited by adding themes() to the plot.

Examples

Run this code
# NOT RUN {
library(LexisPlotR)
lexis.grid(year.start = 1900, year.end = 1905, age.start = 0, age.end = 5)
# }

Run the code above in your browser using DataLab