错误:连续值提供给离散刻度4

时间:2019-03-05 14:51:43

标签: r ggplot2

我正在努力为图表添加颜色,但我不断收到错误消息:

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")

0 个答案:

没有答案