Sorry, I should have specified:

windows(height=y, width=x)

works for the general case....and specifying <<...width=x, height=y>>= to
Sweave works perfectly. Thank you!

Cheers
Rory

On 10/29/07, Prof Brian Ripley <ripley@stats.ox.ac.uk> wrote:
>
> 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@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
>

	[[alternative HTML version deleted]]

