Barplot -adding percentages
问题 So i have this numeric variables which reflect percentages data1.pct<-19 data2.pct<-5 data3.pct<-76 class1.pct<-35 class2.pct<-18 class3.pct<-47 Now i am using this code to generate barplot CairoPDF(paste('data1/', data, '_plot1.pdf', sep=''), family='sans', pointsize=9, width=6, height=3.25) par(mar=(c(4, 4, 1, 13) + 0.1), mgp=c(3, 2, 0), xpd=TRUE) barplot(cbind( c(data1.pct, data2.pct, data3.pct), c(class1.pct, class2.pct, class3.pct)), col=c("firebrick3", "dodgerblue3", "mistyrose1"), ylim