Hi, I have 25 normal and 25 tumor samples and generated 50 boxplots one for each Is there a possibility to alternate the colors for the boxplots Green Red Green Red. Example: A B C D 10 23 23 34 20 24 24 30 20 2434 34 this would generate 4 boxplot one for each. I want the boxplot for A in Green while B in Red and alternated all the way till the end Data I am working on. a = read.delim(list.files()[3],header = T) dim(a) 22011(columns) 52(rows) boxplot(log(a[,2:52]),main = list.files()[3],col = "red") This makes all the boxplots as red but i wanted it altered. Thanks Ramya -- View this message in context: http://r.789695.n4.nabble.com/Boxplot-tp3243780p3243780.html Sent from the R help mailing list archive at Nabble.com.
This should do it: boxplot(log(a[,2:52]),main = list.files()[3],col = c("red", "green")) Tal ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Fri, Jan 28, 2011 at 8:26 AM, Ramya <ramya.victory@gmail.com> wrote:> boxplot(log(a[,2:52]),main = list.files()[3],col = "red") >[[alternative HTML version deleted]]