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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to