ggplot2
framework in a style similar to
Preceden. There are two
types of events, those that have a range (i.e. a start
and end date) and and points-in-time. The latter can be
grouped in separate rows to prevent overlapping or to
organize different types of events. Grouping of
point-in-time events will color code those events
accordingly.
timeline(df, events, label.col = names(df)[1], group.col = names(df)[2], start.col = names(df)[3], end.col = names(df)[4], text.size = 4, text.color = "black", num.label.steps = 5, event.label.col, event.col, event.group.col, event.spots = 1, event.label = "", event.label.method = 1, event.line = FALSE, event.text.size = 4, event.above = TRUE, limits, ...)
df
to use for
labeling.df
to use for
grouping.df
that
specifies the start date.df
that
specifies the end date.df
.df
.events
to use for labeling.events
that
specifies the date.events
to use for grouping.df
is equal to one, so
event.spots = 2
would be twice as high as one
group row from df
.method = 1
labels are printed horizontally; for
method = 2
labels are printed at 45 degree
angles.TRUE
) or below (FALSE
) time bars.data(ww2)
timeline(ww2, ww2.events)
timeline(ww2, ww2.events, event.spots=2, event.label='', event.above=FALSE)
Run the code above in your browser using DataLab