[R] Specify custom par(mfrow()) layout for defined plot()

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 2 15:32:16 CEST 2011


On Mon, 2 May 2011, Michael Bach wrote:

> Uwe Ligges <ligges at statistik.tu-dortmund.de> writes:
>
>> On 29.04.2011 17:10, Michael Bach wrote:
>>> Dear R Users,
>>>
>>> I am doing stats::decompose() on 4 different time series.  When I issue
>>>
>>> csdA<- decompose(tsA)
>>> plot(csdA)
>>>
>>> I get a summary plot for observed, trend, seasonal and random components
>>> of decomposed time series tsA.  As I understand it, the object returned
>>> by decompose() has it's own plot method where mfrow(4,1) etc. is
>>> defined.  Now suppose I wanted to wrap those mfrow(4,1) into my own
>>> mfrow(2,2) layout.  How could I achieve this?  Is there a general way to
>>> handle these cases?  Something like a "meta" par(mfrow())?
>>
>>
>> This does not work and is one of the reasons why the grid package was developed.
>>
>
> Does this mean that there is no way whatsoever or that there is a
> workaround via the grid package??

See the gridBase package.

>
> Kind Regards,
> Michael Bach
>
> ______________________________________________
> R-help at 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.
>

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