[R] barplots and missing xlabels

Geoff Russell geoffrey.russell at gmail.com
Mon Jan 14 08:18:53 CET 2008


Dear useRs,

The following plots only print 2 of the 4 labels under the bars, is there
a way please to force all 4 labels to print?

par(mfrow=c(1,2),mar=c(2,7,3,1))
dat<-data.frame("AgeGroup"=c("2-15","16-20","21-25","26-39"),
"Aorta"=c(20,8,30,60),
"Coronary"=c(7,30,55,65))
barplot(dat$Aorta,ylim=c(0,100),names=as.vector(dat$AgeGroup),ylab=c("Prevalence
(%)"))
title(main=list("Aorta",font=0))
barplot(dat$Coro,names=as.vector(dat$Age),ylim=c(0,100))
title(main=list("Coronary Artery",font=0))


Many thanks,
Geoff Russell




More information about the R-help mailing list