dankelley / plan

R package for project planning
https://dankelley.github.io/plan/
33 stars 9 forks source link

handling multiple start/end dates #2

Closed dankelley closed 9 years ago

dankelley commented 9 years ago

A user who prefers not to join GH posted the following question:

I am trying to make a gantt chart with your plan package in R. Is there a way to plot multiple start/stop times for one task? I am not finding suggestions readily online, other than to use plotrix (which gives you the x axis on side 3 and I can't find a way to suppress).

dankelley commented 9 years ago

There’s nothing built in for that but you could try e.g.

library(plan)
data(gantt)
plot(gantt)
points(as.POSIXct("2008-01-15"), 10)
lines(gantt$start[3]+c(-30*86400,0), rep(10, 2)) 

The above adds a point at a mid-Jan time for the “Field sampling” task as a symbol. (Here, 10 indicates the position of the named item.) Then we add a line, and this illustrates how you can use info that's in the gantt object (here for a 30-day preview of the third item).

I'm attaching a screenshot.

a

dankelley commented 9 years ago

I'll close this because it's very old and it was done (in my view) months ago.