使用ggplot2绘图时出错

时间:2015-03-16 14:48:51

标签: r ggplot2

我有以下图表: Plot

运行以下代码时获得:

Labourproductivity<- ggplot(Finalcombined, aes(x = quarter, y = LabourProductivity))+geom_line(colour="black", size=0.5) +
  labs(x="Time[Quarter]", y=("Labour Productivity"))+
theme(axis.text.x = element_text(angle = 90, hjust = 1, ))+
  geom_point()
Labourproductivity

并获得以下错误: geom_path: Each group consist of only one observation。你需要调整群体美感吗? 我注意到没有创建geomline。我检查了季度是否是一个因子变量,但它表示它是chr(不确定这意味着什么)你们可以帮助我吗?

0 个答案:

没有答案