[R] Lattice: Combining xyplot and histogram

From: Bernd Weiss <bernd.weiss_at_uni-koeln.de>
Date: Tue 14 Jun 2005 - 00:16:39 EST


Dear all,

I am trying to create a lattice plot which consists of 1 xyplot and 2 histograms (each for x and y).

My first try was like this:

x<-rnorm(1000)
y<-rnorm(1000)
xy <- xyplot(y~x)
hist.x <- histogram(x)
hist.y <- histogram(y)

print(xy, position=c(0, 0.2, 1, 1), more=TRUE)
print(hist.x, position=c(0, 0, 1, 0.33),more=T)
print(hist.y, position=c(0.8, 0, 1, 1))

Ok, this is obviously not the solution. I would appreciate any suggestions anyone could give.

Bernd



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 14 00:21:40 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:33 EST