On 12/16/07, Bob Green <[EMAIL PROTECTED]> wrote: > Hello, > > Below is the code for a basic bar graph. I was seeking advice > regarding the following: > > (a) For each time period there are values from 16 people. How I can > change the colour value so that each person has a different colour, > which recurs across each of the three graphs/tie epriods? > > (b) I have seen much more sophisticated examples using lattice (e.g > each person has a separate panel/plot). I am open to alternative code > as to how I could present this data.
Why not use a line plot? It would be much easier to see how an individual is changing over time. Here's a simple way to do that using ggplot2: df <- data.frame(Time1, Time2, Time3) df$id <- 1:nrow(df) dfm <- melt(df, id="id") qplot(variable, value, data=dfm, group=id, geom="line") Hadley -- http://had.co.nz/ ______________________________________________ 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.