with(rajSPLIT, gantt_plot(text.var = dialogue,
grouping.var = person, size=4))
with(rajSPLIT, gantt_plot(text.var = dialogue,
grouping.var = list(fam.aff, sex), rm.var = act,
title = "Romeo and Juliet's dialogue"))
with(rajSPLIT, gantt_plot(dialogue, list(fam.aff, sex), act,
transform=T))
rajSPLIT2 <- rajSPLIT
rajSPLIT2$newb <- as.factor(sample(LETTERS[1:2], nrow(rajSPLIT2),
replace=TRUE))
z <- with(rajSPLIT2, gantt_plot(dialogue, list(fam.aff, sex),
list(act, newb), size = 4))
library(ggplot2); library(scales); library(RColorBrewer); library(grid)
z + theme(panel.margin = unit(1, "lines")) + scale_colour_grey()
z + scale_colour_brewer(palette="Dark2")
Run the code above in your browser using DataLab