>> I have a multi-panel lattice figure. It has an even number of >> equal-width columns. I would like to center text across the columns. >> >> The xlab argument often handles this job nicely. But I want a more >> flexible solution. (I have many strings and want to position them at >> different heights, but always centered across the columns.) >> >> grid.text("Label", x = unit(.5, "npc")) will work when the figure has >> no annotations outside the panel. But when it does -- for example, >> when I use the scales argument to create row labels -- using >> grid.text() in this way doesn't center the text. > Paul Murrell wrote, On 8/26/2013 3:07 PM: > > I think if you downViewport("plot_01.figure.vp") you get what you want, for > example, take a look at ... > > downViewport("plot_01.figure.vp") > grid.rect(gp=gpar(col="red"))
Paul Murrell's downViewport()-based solution works beautifully. Thanks, Paul. John ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.