Dear list, sorry for bothering you with a probably simple question... I searched the archive but couldn't find the right answer. I have computed upper and lower bounds of a region and would like to plot them in a boxplot. My problem is now to get the two boxplots in the same graphic so that the boxplot of the upper bounds is directly on top of the boxplot of the lower bounds. The reason I don't want to have them next to each other is that I have another "grouping" variable. I tried "add" but didn't succeed. I'm using R 0.64.2 on Windows NT. Thanks for your help, Nina Lieske -- Das Recht auf Dummheit geh?rt zur Garantie der freien Entfaltung der Pers?nlichkeit. [Mark Twain] -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi Nina, I just happened to be making a very similar plot last week. You should limit your plotting region in the first boxplot that you make using ylim and then make the second boxplot using the option add=T. The way I did my plot was (I hope is of use for your own one): boxplot(ntr~Temp,data=trpo4.sel,col="orange",at=c(1,2,3,4,5),ylab="log(-log( n/no))-log(Time)",xlab="Temperature (C)",ylim=c(-2,0.5)) boxplot(ntr~Temp,data=cappo4.sel2,col="yellow",add=T,at=c(1,3,4,5),pch=5) legend(3, -1.5, c("Capillar", "Thermorresistometer"),fill = c("yellow", "orange")) the different "at" there is because I lack one level of the study in the second dataset. Last but not least you should update your version of R. I think that one is quite old. cheers, IOsu -----Original Message----- From: Nina Lieske To: r-help at stat.math.ethz.ch Sent: 8/23/01 8:43 AM Subject: [R] difficulies with boxplot Dear list, sorry for bothering you with a probably simple question... I searched the archive but couldn't find the right answer. I have computed upper and lower bounds of a region and would like to plot them in a boxplot. My problem is now to get the two boxplots in the same graphic so that the boxplot of the upper bounds is directly on top of the boxplot of the lower bounds. The reason I don't want to have them next to each other is that I have another "grouping" variable. I tried "add" but didn't succeed. I'm using R 0.64.2 on Windows NT. Thanks for your help, Nina Lieske -- Das Recht auf Dummheit geh?rt zur Garantie der freien Entfaltung der Pers?nlichkeit. [Mark Twain] -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
At 09:43 23/08/01 +0200, you wrote:>Dear list, > >sorry for bothering you with a probably simple question... I searched >the archive but couldn't find the right answer. > >I have computed upper and lower bounds of a region and would like to >plot them in a boxplot. My problem is now to get the two boxplots in the >same graphic so that the boxplot of the upper bounds is directly on top >of the boxplot of the lower bounds. The reason I don't want to have them >next to each other is that I have another "grouping" variable. I tried >"add" but didn't succeed. > >I'm using R 0.64.2 on Windows NT.You should definitely install R-1.3.0! For your problem, I suggest you set par(new=TRUE) after drawing your first plot; for instance:> x <- rnorm(40) > y <- rnorm(40, mean=5) > ff <- gl(2, 20) > boxplot(x ~ ff, ylim=c(-3, 8)) > par(new=TRUE) > boxplot(y ~ ff, ylim=c(-3, 8), axes=FALSE)taking care to set ylim the same in both calls of boxplot(). Emmanuel Paradis>Thanks for your help, >Nina Lieske > >-- >Das Recht auf Dummheit geh?rt zur Garantie der freien Entfaltung der >Pers?nlichkeit. [Mark Twain] > > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.->r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html >Send "info", "help", or "[un]subscribe" >(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._> >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._