【发布时间】:2016-04-04 22:06:51
【问题描述】:
我的脚本从 csv 文件中读取数据。我正在计算平均值,但我希望将图表上的平均值视为水平线。
avg = myData$Electricity.Costs
mean(avg)
ggplot(data = myData,
aes(x = Date, y = Electricity.Costs,
group = Budget.Plan.Monthly.Amount, colours = "Budget.Plan.Monthly.Amount")) +
geom_line() +
geom_point(aes(colour = Budget.Plan.Monthly.Amount))
你能给我一些建议吗?
【问题讨论】: