[R] Two graphs of different sizes on one devise. How to?

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Fri Mar 14 11:23:32 CET 2003


On Fri, 14 Mar 2003, wolski wrote:

> I am trying to plot two graphics with different sizes to one devise.
> 
> par(mfrow=c(1,2))
> # is set the size for the first graphic
> par(fig=c(0,7,0,10)/10)
> #and plot it
> plot(1,1)
> #then i set the size 
> par(fig=c(7,10,0,10)/10)
> 
> #and plot the second one
> plot(2,2)
> 
> 
> Unfortunately when i plot figure two figure 1 disapear.
> How to avoid these?

?par, look at `new'.

Setting fig unsets the mfrow call.

As far as I recall this is covered in some detail in `An Introduction to 
R'.  Alternatives are to use the layout facilities (?layout) or 
split.screen.

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