我有一个脚本,可以从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))
你能给我一些建议吗?
关于IT技术,以下是需要翻译的内容: