Rounding % Labels on bar chart in ggplot2
问题 q1 <- qplot(factor(Q1), data=survey, geom="histogram", fill=factor(Q1), ylim=c(0,300)) options(digits=2) q1 + geom_bar(colour="black") + stat_bin(aes(label=..count..), vjust=-2, geom="text", position="identity") + stat_bin(geom="text", aes(label=paste(..count../sum(..count..)*100,"%"), vjust=-0.75)) + labs(x="Question # 1:\n 0 = Didn't respond, 1 = Not at all familiar, 5 = Very familiar") + opts(title="Histogram of Question # 1:\nHow familiar are you with the term 'Biobased Products'?",