[R] simple plotting question

Prasenjit Kapat kapatp at gmail.com
Sun May 20 06:11:17 CEST 2007


On Saturday 19 May 2007 03:29:31 pm Ranjan Maitra wrote:
> Hi,
>
> I have a very simple question which I can't see
> how to figure out.
>
> Basically, I have a matrix of plots, but I want
> no margin space in between them. I want a wide
> right margin (outside of the block of
> plots) so that I can place a legend there.
>
> I tried the following:
>
> par("mar"=c(0,0,0,1), mfrow=c(4,4))
> for (i in 8:23)  {
> image(xx$ttt[2*(128:1),2*(128:1),i,1],axes=F,col=gray(0:15/15))
> }
>
> but I get a margin to the right of every
> plot.

Is "oma" or "omi" something of your interest? (see in ?par)
  par(mar=c(0,0,0,0), oma=c(0,0,0,1), mfrow=c(4,4))


Regards
PK



More information about the R-help mailing list