[R] A problem of splitting the right screen in 3 or more independent vertical boxes:

Aldi Kraja aldi at wustl.edu
Fri May 3 23:46:58 CEST 2013


Hi,
Based on par function, I can split the screen into  two parts left and 
right.
I wish x occupies the half left screen, and all plants occupy half right 
screen, which happens right now.

But I wish the right screen, to be split in 3 or more vertical parts 
where each pair of the same type of plant, are together in its own block 
of boxplot, because each plant has its own unit of measure.
Let's say wheat is measured in ton, tomato in pound and cucumbers as 
counts. :-)

x<-rnorm(1000,mean=0,sd=1,main="Right screen")

wheat1<-rnorm(100,mean=0,sd=1)
wheat2<-rnorm(150,mean=0,sd=2)
tomatos3<-rnorm(200,mean=0,sd=3)
tomatos4<-rnorm(250,mean=0,sd=4)
cucumbers5<-rnorm(300,mean=0,sd=5)
cucumbers6<-rnorm(400,mean=0,sd=6)
par(mfrow=c(1,2))

hist(x, main="Left screen OK")

boxplot(wheat1,wheat2,tomatos3,tomatos4,cucumbers5,cucumbers6)
title ("Right screen: boxplot with plants")

Thank you in advance for any suggestions,

Aldi

--



More information about the R-help mailing list