[英]R Stacked Bar Graph problems
我一直在嘗試通過獲取計數來制作堆積的條形圖,如下所示:
counts <- table(results$Performance, results$Country)
barplot(counts, main = "Game Count per Football Team",
xlab = "Football Teams", ylab = "Game Count",
col = c("darkblue","red", "Yellow"),
legend = rownames(counts),ylim=c(0,1000)
)
計數表是這樣的:
ENG ESP ITA NED
BETTER 330 257 264 197
NO CHANGE 312 234 188 108
WORSE 252 199 143 74
但是,這是我從圖表中得到的結果:
顯然,它沒有在表中反映結果-為什么會發生這種情況?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.