On Thu, 22 May 2014 01:43:23 PM Luigi Marongiu wrote: > Dear all, > I have been plotting response variable (defined as "y" in the example > below) from 4 groups (defined as "z" variable ) under 5 conditions > (defined by the "x" variable). The formula used is: y ~ z+x. > I can differentiate the different z value using a call pch=c(symbol 1, > symbol 2, ...) but it would be even better to have different colours > for each of these symbols. > In analogy to the pch=c(symbol 1, symbol 2, ...) i have tired to > provide a bg(colour 1, colour 2, ...) but this give the colour to the > x variables rather than the z ones. > How can I give the colour to the z variables? > Hi Luigi, Very good example. The brkdn.plot function assigns colors to the "group" variable based upon the "col" argument. Try using this:
brkdn.plot(y~z+x, data=my.data, mct="mean", md="sd", stagger=NA, dispbar=TRUE, type="p", pch=20, col=2:6, main="z indicated by colour (???)", xlab="x",ylab="y",cex=2) Jim ______________________________________________ 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.