[R] Layout, xyplot and saving in file

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Mar 11 18:31:25 CET 2006


On Sat, 11 Mar 2006, Deepayan Sarkar wrote:

> On 3/11/06, Jean-Louis Abitbol <abitbol at sent.com> wrote:
>> Dear all,
>>
>> I am trying to use layout with xyplot and save the plot in a file.
>>
>> The saved file contains only the last panel (used jpg, wmf and pdf
>> options in the savePlot function)
>
> Don't do that; instead, use the device functions directly. For example,
>
> pdf(file = "test.pdf")
> print(test)
> dev.off()
>
>> I am not familiar with the graphic file formats and don't know if they
>> can handle multipage output.
>
> Multiple page support depends on the device, e.g. pdf() does, jpeg()
> doesn't. Look at the respective help pages for details (and ?Devices
> for an overview). Also look at ?trellis.device for pertinent comments.

[Well, jpeg() does allow multiple pages, in multiple files, and that is on 
by default if the device is called directly.]

-- 
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