[R] Changing axis lable text size in plots?

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Wed Apr 18 15:43:55 CEST 2007


take a look at ?par() and especially at the 'cex.lab', 'cex.main', and 
'cex.axis' arguments. For instance, you could use something like:

plot(
dafExpo$grn07,dafExpo$grn09,
xlim=c(0,numAxeMax),
ylim=c(0,numAxeMax),
pch=1,
xlab="Green at 7 AM : NOx [(µg/m3)*hour]",
ylab="Green at 9 AM : NOx [(µg/m3)*hour]",
cex.main = 1.8, cex.lab = 1.5, cex.axis = 1.2
)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Martin Hvidberg" <Martin at Hvidberg.net>
To: <R-help at stat.math.ethz.ch>
Sent: Wednesday, April 18, 2007 3:26 PM
Subject: [R] Changing axis lable text size in plots?


Dear list

I'm plotting ( boxplot() and plot() ) some data for a publication.
The editor would like the text labels on the plots in a larger font.

I'm doing something like this:

<snip>

jpeg(
filename = "D:/Martin/Work/CleanPath/RAF1%03d.jpg",
width = 1000,
height = 600,
pointsize = 12,
quality = 100,
bg = "white",
res = 96,
restoreConsole = TRUE
)

boxplot(
dafExpo[,c(1,2,3,4,5,6,7,8,9,10,11,12)],
main = "Total NOx Exposure per trip"
)

numAxeMax = max(dafExpo$grn07, dafExpo$grn09, dafExpo$grn14, 
dafExpo$grn16)

plot(
dafExpo$grn07,dafExpo$grn09,
xlim=c(0,numAxeMax),
ylim=c(0,numAxeMax),
pch=1,
xlab="Green at 7 AM : NOx [(µg/m3)*hour]",
ylab="Green at 9 AM : NOx [(µg/m3)*hour]"
)
abline(0,1)

<snip>

dafExpo is a dataframe and the above code works just fine.

My question:

How do I change the size of the text seen on the plot, the axis labels
in particular?
--------------------------------------------
My mailbox is spam-free with ChoiceMail, the leader in personal and 
corporate anti-spam solutions. Download your free copy of ChoiceMail 
from www.digiportal.com

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list