Re: [R] Lattice xyplot -- footnote font size / mtext

From: Deepayan Sarkar <deepayan_at_stat.wisc.edu>
Date: Sat 04 Jun 2005 - 07:15:41 EST

On Friday 03 June 2005 15:47, Kittler, Richard wrote:
> Is there a way of controlling the font size and alignment of a footnote
> in an xyplot, or alternatively of using 'mtext' to place a footnote at
> the bottom of a graph?

Your best bet is using 'page', e.g.

library(grid)
library(lattice)
xyplot(1 ~ 1,

       page = function(n) 
           grid.text(paste("footnote for page", n), 
                     x = .99, y = 0.01, 
                     default.units = "npc", 
                     just = c("right", "bottom")))

You could also use panel.text instead of grid.text, but the latter is more flexible. You could make the font smaller by adding the following in the grid.text call:

gp = gpar(fontsize = 8)

Deepayan



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jun 04 07:10:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:22 EST