[R] Drawing rectangles in multiple panels

Jonathan Williams williams222 at llnl.gov
Wed Jul 11 18:40:24 CEST 2007


Hi folks,

I'm having some trouble understanding the intricacies of panel 
functions.  I wish to create three side-by-side graphs, each with 
different data-- so far, so good: I rbind() the data, add a column of 
subscripts as a conditioning variable, load up the lattice package, 
specify either a c(3,1) 'layout' or work through 'allow.multiple' and 
'outer' and I'm good to go.

But now I wish to add three rectangles to each plot, which will be in 
different places on each panel, and I'm terribly stuck.  I can guess 
this requires defining a panel function on the fly, but none of my 
attempts are working.  Suggestions?

Thanks much, - Jonathan



More information about the R-help mailing list