plot.gantt {plan}R Documentation

Draw a Gantt diagram

Description

Plot a Gantt object.

Usage

plot.gantt(x,
           time.format = NULL,
           time.labels.by, time.lines.by,
           event.time = NULL, event.label = NULL,
           col.done = gray(0.3), col.notdone = gray(0.9),
           col.event = gray(0.1), col.connector = "black",
           grid.col = "lightgray", grid.lty = "dotted",
           main = "",
           cex=par("cex"), 
           debug=FALSE,
 ...)

Arguments

x an object of class gantt.
time.format format for dates on time axis; defaults to 3-letter month.
time.labels.by suggested label increment on time axis, e.g. time.labels.by="2 months" to get a two-month interval. If not supplied, the axis will be generated automatically.
time.lines.by suggested interval between vertical grid lines on the plot, e.g. time.lines.by="1 week" for weekly. If not supplied, the grid will be generated automatically.
event.time List of events, e.g. conferences, whose time cannot be altered.
event.label list of names of these events.
col.done colour of work that has been done already.
col.notdone colour of work that has not been done already.
col.event colour of events.
col.connector colour of (optional) connectors between items.
grid.col colour for grid
grid.lty line type for grid
main character string to be used as chart title.
cex numeric, font-size factor.
debug boolean, set to TRUE to monitor the work.
... extra things handed down.

Details

Plots a gantt chart, possibly with events superimposed.

Value

The gantt object, returned invisibly.

Note

The defaults work well for projects that take a year or two. Consider adjusting time.labels.by and time.lines.by for projects that are much shorter or longer.

Author(s)

Dan Kelley

References

Gantt diagrams are described on wikipedia http://en.wikipedia.org/wiki/Gantt_Chart.

See Also

Use read.gantt to read gantt data, and summary.gantt to summarize them.

Examples

library(plan)
data(gantt)
summary(gantt)
plot(gantt)
# Add a couple of event
event.label <- c("Proposal", "AGU")
event.time <- c("2008-01-28", "2008-12-10")
plot(gantt, event.label=event.label,event.time=event.time)

[Package plan version 0.1.0 Index]