Re: [R] Adding margin text to lattice graphics

2011-04-12 Thread Deepayan Sarkar
On Mon, Apr 11, 2011 at 3:53 AM, baptiste auguie baptiste.aug...@googlemail.com wrote: Yes, very sorry about this -- I had subconsciously ignored the hypothetical possibility that anyone wouldn't have ggplot2 loaded in their .Rprofile ;) Replacing mpg with beaver1 (datasets) should be more

Re: [R] Adding margin text to lattice graphics

2011-04-11 Thread Oscar PerpiƱan Lamigueiro
Hi, You can try the combination of c.trellis and update from the latticeExtra package. For example: p - xyplot(1~1) update(c(p, p, p, p), xlab='SomeText', ylab='MoreText') update(c(p, p, p, p), xlab=c('SomeText', 'SomeText2'), ylab=c('MoreText', 'MoreText2')) There are lots of examples in

Re: [R] Adding margin text to lattice graphics

2011-04-10 Thread baptiste auguie
Yes, very sorry about this -- I had subconsciously ignored the hypothetical possibility that anyone wouldn't have ggplot2 loaded in their .Rprofile ;) Replacing mpg with beaver1 (datasets) should be more reproducible. That being said, I was told off-list that this is not answering at all the

[R] Adding margin text to lattice graphics

2011-04-09 Thread Dennis Fisher
Colleagues I am learning lattice graphics (R 2.12.2; OS X). Several days ago, I inquired about adding margin text to lattice graphics. Jim Price offered a useful reply, suggesting that I add: page = function(page) grid.text('words', x = 0.5, y = 0.01) to my call to the function. The

Re: [R] Adding margin text to lattice graphics

2011-04-09 Thread baptiste auguie
Hi, You may want to read about ?viewport in the grid package. They allow you to position graphical elements wherever you want on a page, such as lattice plots and text (grid.text). For a high-level interface, you could try the following, library(gridExtra) library(lattice) p1 = xyplot(1~1) p2