[R] Fwd: axis lab font in r

Jim Lemon jim at bitwrit.com.au
Wed Sep 18 00:22:27 CEST 2013


On 09/18/2013 02:23 AM, Ahmed Attia wrote:
> ---------- Forwarded message ----------
> From: Ahmed Attia<ahmedatia80 at gmail.com>
> Date: Tue, Sep 17, 2013 at 11:17 AM
> Subject: axis lab font in r
> To: r-help-request at r-project.org
>
>
>
> I have an a question about the axis lab font in r. I use font.lab, but
> r changes the font of x axis lab only. How I can change the font of y
> lab axis as well?
>
> I have another problem; when I increase the size of y lab, the lab
> goes out of the graph box.
>
Hi Ahmed,
In the example below, font.lab appears to work for both axes:

plot(1:10)
# allow user to step through plots
par(ask=TRUE)
# change the font to bold
par(font.lab=2)
plot(1:10)
# double the size of the axis labels
par(cex.lab=2)
plot(1:10)
# add more space on the left
par(mar=c(5,6,4,2))
plot(1:10)
par(ask=FALSE)

Jim



More information about the R-help mailing list