Hello All,

I'm having some issues controlling graphics in R.  I was wondering if anyone
may help me tackle this problem:

Given a data frame "X" with variables "Year", "Factor" (w/ n groups), and
"Freq"

How do I create a single graphic with the following plots aligned in a
vertical stack?

1. box plot in the fashion Freq~Year|Factor
2. box plot ignoring Factor, Freq~Year

Using the following code:

library(lattice)
tp1<-bwplot(Freq~Year,data=X,main="All
data",ylab="Freq",xlab="Year",layout=c(1,1))
tp2<-bwplot(Freq~Year|Factor,data=X,ylab="Freq",xlab="Year",layout=c(1,2))
plot(tp1,split=c(1,1,1,2)); plot(tp2,split=c(1,2,1,2),newpage=FALSE)

...I've managed to get a graphic that looks like two unrelated images on one
screen: one image with the plot without taking Factor into account; and the
other image, a smooshed lattice plot consisting of n plots in one column
with n rows.  The axis are not aligned and scaled differently (in the second
image the individual plots are half the height of in the first image).
How can I fix this?  It would be nice to create a graphic with all of the
plots stacked on top of each other with the same axis dimensions and
ranges.

Thanks for your help in advance!

-- 
Lanna Jin

lannajin@gmail.com
510-898-8525

	[[alternative HTML version deleted]]

