[R] Gantt chart but slightly different

Jim Lemon jim at bitwrit.com.au
Sat May 9 13:56:05 CEST 2009

Beata Czyz wrote:
> Hello,
> I am new to this list and rather new to graphics with R.
> I would like to make a chart like Gantt chart, something like that:
> ...
> but I would like to fill the different blocks of tasks with different
> pattern i.e. first blocks of Male 1 and Male 2 with pattern 1, second
> blocks of Male 1 and Male 2 with pattern 2 etc.
> Any idea?

Hi Beata,
This could be done by replacing the "taskcolors" argument in the 
"gantt.chart" function with an "angle" argument and passing that 
argument to the "rect" function that draws the bars. You could then get 
hatching of different directions instead of colors. Like this:

 half.height=0.25,hgrid=FALSE,main="",xlab="",cylindrical=FALSE) {

(a great chunk of the gantt.chart function)


(the rest of the gantt.chart function)


More information about the R-help mailing list