[R] lattice: add a marginal histogram on top of the colorkey of a levelplot?

2012-05-29 Thread Andy Bunn
Lattice experts: Can you think of a way to produce a levelplot as below and then add a histogram of the z variable to the top margin of the plot that would sit on top of the color key? x - seq(pi/4, 5 * pi, length.out = 100) y - seq(pi/4, 5 * pi, length.out = 100) r -

Re: [R] lattice: add a marginal histogram on top of the colorkey of a levelplot?

2012-05-29 Thread ilai
?plot.trellis. In general something like mlp- levelplot(... mhist- histogram(... plot(mlp,split=c(1,2,1,2),more=T) plot(mhist,split=c(1,1,1,2),more=F) You will need to do some work on the padding and layout widths to get the distances right (I assume the key is to be the x-axis of the