![](/img/trans.png)
[英]create bar plot in ggplot2 and add dots according to labels from another data frame
[英]Create data labels for frequency plot in ggplot2?
在這個問題中,可以使用ggplot創建頻率圖。 例如:
f <- factor(sample(letters[1:5], 100, r=T))
h <- table(f) / length(f)
dat <- data.frame(f = f)
ggplot(dat, aes(x=f, y=..count.. / sum(..count..), fill=f)) + geom_bar()
現在如何獲得圖中每個單獨條形的數據標簽?
謝謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.