[Rd] Fixed plot height question

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 11 23:00:46 CET 2006


On Wed, 11 Jan 2006, Mike Schaffer wrote:

> I've tried many things, so it's time to call on the gurus.  I'm
> trying to make a plot that will conform to the width of the plot
> device but have a fixed height (say one inch regardless of the plot
> device height setting -- unless obviously it's less than the plot
> device).
>
> Is this possible?

Yes.  Set par(pin=c(par("pin")[1], 1)).

Warning: you may not have meant the plot height, rather the figure height.
See R-Intro for the differences.

> Additionally, I'd like to be able to plot something immediately after
> this plot and have it right below.  Would this require a par(mfrow=c
> ()) command? Can anyone help?

Using par(plt=) will do this for you.  Or look into grid, 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-devel mailing list