gantt_wrap(dataframe, plot.var, facet.vars = NULL, fill.var = NULL,
title = NULL, ylab = 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, plot = TRUE)
TRUE
reverse the
current plotting order so the first element in the
plotting variable's levels is plotted on top.gantt_wrap
uses
facet_wrap
rather than
facet_
TRUE
the repeated
facets will be transformed from stacked to side by side.TRUE
converts scale
to h:m:s format. Default NULL
attempts to detect
if object is a cm_time2long object"fixed"
, the
default), free ("free"
), or free in one dimension
("free_x"
, "free_y"
)"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 scalTRUE
the
horizontal lines will be removed.TRUE
the x ticks will
be displayed.TRUE
the y ticks will
be displayed."left"
, "right"
, "bottom"
,
"top"
, or two-element numeric vector).NULL
).TRUE
the Gantt bars
touch the edge of the graph.TRUE
the plot will
automatically plot. The user may wish to set to
FALSE
for use in knitr, sweave, etc. to add
additional plot layers.gantt
, gantt_plot
,
gantt_rep
,
facet_grid
,
facet_wrap
dat <- gantt(mraja1$dialogue, list(mraja1$fam.aff, mraja1$sex),
units = "sentences", col.sep = "_")
htruncdf(dat)
gantt_wrap(dat, "fam.aff_sex", title = "Gantt Plot")
dat$codes <- sample(LETTERS[1:3], nrow(dat), TRUE)
gantt_wrap(dat, "fam.aff_sex", fill.var = "codes",
legend.position = "bottom")
dat2 <- with(rajSPLIT, gantt_rep(act, dialogue,
list(fam.aff, sex), units = "words", col.sep = "_"))
htruncdf(dat2)
x <- gantt_wrap(dat2, "fam.aff_sex", facet.vars = "act",
title = "Repeated Measures Gantt Plot")
library(ggplot2); library(scales); library(RColorBrewer)
x + scale_color_manual(values=rep("black",
length(levels(dat2$fam.aff_sex))))
Run the code above in your browser using DataLab