[R] Changing size of lattice plot?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 29 12:14:40 CET 2007

On Mon, 29 Oct 2007, Rory Winston wrote:

> Thank you Brian! This seems to do what I want for a screen device, however,

The 'this' having been deleted from your reply ...!

> I am using this plot within Sweave, so the code in my orginal email is
> within a <<>>= block. If I place a call to windows() just before I print()
> the lattice plot, then I get an access denied error when generating the TeX
> file, as R has not closed the PDF file. If I place a call to dev.off() just
> before the end of the block, it doesnt seem to make any difference...I
> presume this is because of the interaction with Sweave opening and closing
> its own device within the scope of the block. Is there any solution for
> this, or do I need to manually call pdf() and \includegraphics here?

You can tell Sweave about width and height for each chunk: see its manual 
for details.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list