[英]How can I plot several series as lines and one of them as area using ggplot2?
没有数据集很难测试(可以在示例中提供一个数据集,可以使用dput()
),但是在geom_area
,应该在data
参数中进行选择。例如,像这样。
ggplot +
geom_area(data = df.area[df.area$Series == "S_1", ], aes(x=Index, y=Value))
geom_line(data = df.lines, aes(x=Index, y=Value, colour=Series))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.