Jun,

I created a function called "pageNum" that does exactly what you want for
both 'base' and 'lattice' graphics.  You can find it here:
http://ryouready.wordpress.com/2009/02/17/r-good-practice-adding-footnotes-to-graphics/

Kevin


On Wed, Apr 21, 2010 at 7:23 PM, Jun Shen <jun.shen.ut@gmail.com> wrote:

> David, Duncan,
>
> Thanks. I didn't realize the functions in "graphic" also work in "lattice".
> I thought they didn't work with each other.
>
> Jun
>
>
> On Wed, Apr 21, 2010 at 6:51 PM, Duncan Murdoch <murdoch.duncan@gmail.com
> >wrote:
>
> > On 21/04/2010 5:41 PM, Jun Shen wrote:
> >
> >> Dear all,
> >>
> >> How do stamp my graphs with date and time somewhere like left corner of
> >> the
> >> graph (not the plotting area). I know date() and Sys.time(), but where
> to?
> >> Thanks.
> >>
> > Use mtext() to put text onto a plot.  For example,
> >
> > plot(1)
> > mtext(Sys.time(), side=1, line=4, at=par("usr")[1])
> >
> > (You will need to play with the side=, line= and at= specifications to
> get
> > the location you want.)
> >
> > Duncan Murdoch
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Kevin Wright

	[[alternative HTML version deleted]]

