[R] Spacing and margins in plot
Raubertas, Richard
richard_raubertas at merck.com
Wed Sep 7 00:13:06 CEST 2005
You can do this with the 'mgp' argument to par() (see ?par).
For example, I find par(mgp=c(2, 0.75, 0)) (which puts the
axis label on line 2 and the axis values on line 0.75) nicely
"tightens up" the space around a plot.
Rich Raubertas
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Earl F. Glynn
> Sent: Thursday, September 01, 2005 11:14 AM
> To: r-help at stat.math.ethz.ch
> Subject: Re: [R] Spacing and margins in plot
>
>
> "Chris Wallace" <c.wallace at qmul.ac.uk> wrote in message
> news:m3wtm0502o.fsf at qmul.ac.uk...
>
> > how about
> > plot(..., xlab="")
> > title(xlab="label text", line=2)
>
> Yes, Chris, I like your idea, especially when I can "fix"
> both X and Y axes
> at the same time:
>
> plot(0, xlab="",ylab="")
> title(xlab="X axis", ylab="Y axis", line=2)
>
> I'd prefer a way to set the axis title line at the same time
> I change the
> mar parameters, but it's not a big deal.
>
> Thanks.
> efg
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>
>
More information about the R-help
mailing list