我一直在尝试通过获取计数来制作堆积条形图,如下所示:
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
然而,这是我从图表中得到的结果:
显然它没有反映表中的结果——为什么会发生这种情况?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句