[R] Gantt chart like graphics

kljosc kljosc at liwest.at
Wed May 28 19:54:34 CEST 2008


Dear R Community,

I have a dataframe like this

dat           product1 product2 ... productn
01.1.2008  1           1               1
02.1.2008  1           1               2
.
15.2.2008  2           2               NA
.
04.4.2008  2           2               1
05.4.2008  NA         2               NA

(date ascending order, 1:n products with status 1, 2 or NA)

and want to produce a graphic like this, where 1 or 2 are colored
rectangles, NAs are white:

product1 11..........2............2_
product2 11..........2............22
.
.
productn 12.........._............1_
                 time_axis (=dat) ->

which looks like a Gantt chart with multiple time slots. I have tried it
with image() which looks good, but I don't know how to produce an y-axis
with labels product1, etc. and a x-axis with date labels.
Further, I want to draw a scatterplot below (using layout()) with the same
x-axis. 
Maybe someone has a better idea which is easier to label?

Regards
Klemens
-- 
View this message in context: http://www.nabble.com/Gantt-chart-like-graphics-tp17518407p17518407.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list