[R] what is absolute size of mar

Duncan Murdoch murdoch.duncan at gmail.com
Thu Mar 7 20:18:54 CET 2013


On 07/03/2013 2:07 PM, Not To Miss wrote:
> Hi R users,
>
> The margin parameter mar is measured in unit of lines, the size of which is
> automatically adjusted during plotting. I am wondering how can get the size
> of a line and how can I control the margin size by controlling the line
> size? (I know I can use mai to control the absolute size of margin, but in
> some situations that parameter does not exist. For example, heatmap() only
> accept mar as a parameter to adjust the space for the axes labels.) I'd
> appreciate any help.

You need to look at par().  I believe a line would be 
par("lheight")*par("cin")[2] inches.  You can use grconvertX or 
grconvertY to convert from inches to other units.

Duncan Murdoch



More information about the R-help mailing list