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

From: Kittler, Richard <richard.kittler_at_amd.com>
Date: Sat 04 Jun 2005 - 07:12:36 EST


Great! That should do it. Thanks.

--Rich

-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan@stat.wisc.edu] Sent: Friday, June 03, 2005 2:16 PM
To: r-help@stat.math.ethz.ch
Cc: Kittler, Richard
Subject: Re: [R] Lattice xyplot -- footnote font size / mtext

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:16:43 2005

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