我正在努力为图表添加颜色,但我不断收到错误消息:
continuous value supplied to discrete scale
这是我正在使用的代码:
ggplot(by_team_mean_score1) +
geom_col(mapping = aes(x = reorder(team1, mean_score1), y = mean_score1))+
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
ggtitle("Mean No. of Home Goals") +
xlab("Team") +
ylab("Mean No. Home Goals")