[R] layout problem

Hotz, T. th50 at leicester.ac.uk
Fri Jun 6 18:38:47 CEST 2003


> I have a question about using the layout command within a 
> function.  I've
> written function that uses layout to create a figure from 2 
> plots.  This
> works fine to create a figure.  When I use par(mfrow = 
> c(2,2)) to create multiple
>  plots, it seems that the layout command resets the mfrow parmeter.
> Is there a way for me to avoid this problem?

As far as I understand that is not possible, since 
"`layout' divides the device up", not a part of the device.

If you need to split your device again and again, you should
package grid (or lattice, on a higher level); these allow to do so.
However, these need different plot commands, i.e. plot() will not
work with them

HTH

Thomas

---

Thomas Hotz
Research Associate in Medical Statistics
University of Leicester
United Kingdom

Department of Epidemiology and Public Health
22-28 Princess Road West
Leicester
LE1 6TP
Tel +44 116 252-5410
Fax +44 116 252-5423

Division of Medicine for the Elderly
Department of Medicine
The Glenfield Hospital
Leicester
LE3 9QP
Tel +44 116 256-3643
Fax +44 116 232-2976




More information about the R-help mailing list