Usage
gantt_wrap(dataframe, plot.var, facet.vars = NULL,
fill.var = NULL, title = NULL,
ylab = as.character(plot.var),
xlab = "duration.default", rev.factor = TRUE,
transform = FALSE, ncol = NULL, minor.line.freq = NULL,
major.line.freq = NULL, sig.dig.line.freq = 1,
hms.scale = NULL, scale = NULL, space = NULL, size = 3,
rm.horiz.lines = FALSE, x.ticks = TRUE, y.ticks = TRUE,
legend.position = NULL, bar.color = NULL,
border.color = NULL, border.size = 2,
border.width = 0.1, constrain = TRUE)
Arguments
dataframe
A data frame with plotting variable(s)
and a column of start and end times.
plot.var
A factor plotting variable (y axis).
facet.vars
An optional single vector or list of 1
or 2 to facet by.
fill.var
An optional variable to fill the code
strips by.
title
An optional title for the plot.
rev.factor
logical. If TRUE reverse the current
plotting order so the first element in the plotting
variable's levels is plotted on top.
transform
logical. If TRUE the repeated facets
will be transformed from stacked to side by side.
minor.line.freq
A numeric value for frequency of
minor grid lines.
major.line.freq
A numeric value for frequency of
major grid lines.
sig.dig.line.freq
An internal rounding factor for
minor and major line freq. Generally, default value of 1
suffices for larger range of x scale may need to be set
to -2..
hms.scale
logical. If TRUE converts scale to
h:m:s format. Default NULL attempts to detect if object
is a cm_time2long object
scale
Should scales be fixed ("fixed"
, the
default), free ("free"
), or free in one dimension
("free_x"
, "free_y"
)
space
If "fixed"
, the default, all panels
have the same size. If "free_y"
their height will
be proportional to the length of the y scale; if
"free_x"
their width will be proportional to the
length of the x scal
size
The width of the plot bars.
rm.horiz.lines
logical. If TRUE the horizontal
lines will be removed.
x.ticks
logical. If TRUE the x ticks will be
displayed.
y.ticks
logical. If TRUE the y ticks will be
displayed.
legend.position
The position of legends.
("left"
, "right"
, "bottom"
,
"top"
, or two-element numeric vector).
bar.color
Optional color to constrain all bars.
border.color
The color to plot border around Gantt
bars (default is NULL).
border.size
An integer value for the size to plot
borders around Gantt bars. Controls length (width also
controlled if not specified).
border.width
Controls border width around Gantt
bars. Use a numeric value in addition to border size if
plot borders appear disproportional.
constrain
logical. If TRUE the Gantt bars touch
the edge of the graph.