Skip to content
Prev 65275 / 398525 Next

Text in lattice Graphics outside plot area

On Wednesday 02 March 2005 09:29, Bock, Michael wrote:
If I'm not mistaken, you want (conceptually) a label for every page, not 
every panel (in your case you have one panel per page, so the 
distinction is not as obvious). The correct way to do this would be 
through the 'page' argument, not the panel function. e.g., 


barchart(variety ~ yield | site, data = barley, 
         groups = year, layout = c(3,1), 
         page = function(n) {
             grid.text(label = "Privileged and Confidential \nDRAFT",
                       x = unit(0.01, "npc"), y = unit(0.95, "npc"),
                       just = c("left", "center"))
         })

HTH,

Deepayan