[R] change plot area in barplot2

Marc Schwartz marc_schwartz at me.com
Fri Jun 24 02:48:35 CEST 2011


On Jun 23, 2011, at 4:11 PM, Adrienne Keller wrote:

> I would like to change the plot area for a figure I made with barplot2 so that it is rectangular (for example, 5 x 3 inches) rather than square, which is the default. What is the best way to do this?
> 
> Thanks,
> 
> Adrienne

Hi,

The size of the plot is going to be largely dependent upon the output device being used and the dimension settings for the device. If you are going to use a bitmapped device (eg. png()) as opposed to a vector device (eg. pdf()), then the physical size of the image will also be dependent upon the resolution of the display (in pixels per inch) upon which the file is being viewed.

See ?Devices for more information on the available output devices on your system. Then select the particular device you wish to use for details on how to adjust the dimensions.

Regards,

Marc Schwartz



More information about the R-help mailing list