[R] Can I make my colnames bold?
beloitstudent
schurrk at beloit.edu
Sat Dec 18 01:30:43 CET 2010
Hello forum! As the subject indicates, I am trying to make a barplot and
would like my column names to be in bold. Is this possible in R without
having to make my column names in mtext? Any help would be much
appreciated. The code I am using is as follows.
par(mar=c(3,8,2,2))
par(adj=.5)
par(font=2)
par(oma=c(3,3,3,3))
par(xpd=TRUE)
Blot<-matrix(c(25.2995, 0.7625, 25.6135, 36.5770, 39.7085, 29.0730, 38.1240,
10.5205,45.3135), ncol=3, byrow=TRUE)
colnames(Blot)<-c("Pancreas", "Liver", "Muscle")
rownames(Blot)<-c("0 hour fast", "5 hour fast", "10 hour fast")
blot<-as.table(Blot)
barplot(blot,beside=TRUE, col=c('darkorchid1','darkorchid3', 'darkorchid4'),
ylim=c(0,80), yaxp=c(0,80,8), font.lab=2, las=1, axes=FALSE,cex.lab=1.6)
axis(2, at=c("0", "10", "20", "30", "40", "50", "60", "70"), lwd=2,
font=1.7, pos=-.025,cex.axis=2, las=2)
mtext("Relative Intensity", side=2, line=6, adj=.525, cex=2, font=1)
arrows(1.5, 25.2995, 1.5, 36.7875, code=2, angle=90, lwd=2, length=.1)
arrows(2.5, 36.577, 2.5, 48.065, code=2, angle=90, lwd=2, length=.1)
arrows(3.5, 38.124, 3.5, 49.612, code=2, angle=90, lwd=2, length=.1)
arrows(5.5, 0.7625, 5.5,24.2575, code=2, angle=90, lwd=2, length=.1)
arrows(6.5, 39.7085, 6.5,63.2035, code=2, angle=90, lwd=2, length=.1)
arrows(7.5, 10.5205, 7.5,34.0155, code=2, angle=90, lwd=2, length=.1)
arrows(9.5, 25.6135, 9.5,29.8331, code=2, angle=90, lwd=2, length=.1)
arrows(10.5, 29.073, 10.5,33.2926, code=2, angle=90, lwd=2, length=.1)
arrows(11.5, 45.3135, 11.5,49.5331, code=2, angle=90, lwd=2, length=.1)
legend(7.5, 80, c("0 hour fast", "5 hour fast", "10 hour fast"), bty="n",
adj=0, fill=c('darkorchid1','darkorchid3','darkorchid4'), text.col="black",
cex=1.3)
arrows(-.025, 0, 12, 0, code=0, angle=180, lwd=2)
--
View this message in context: http://r.789695.n4.nabble.com/Can-I-make-my-colnames-bold-tp3093323p3093323.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list