Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.61.0601112155550.27354@gannet.stats>
Date: 2006-01-11T22:00:46Z
From: Brian Ripley
Subject: Fixed plot height question
In-Reply-To: <75ABA294-FD90-4CC8-995B-17F35BF55A71@bu.edu>

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