data <- data.frame(x=c(1,2,3,4,5,6,7,8,9,10),y1=c(-2,-7,-12,-17,-22,-27,-32,-37,-42,-47),y2=c(1003,2003,3003,4003,5003,6003,7003,8003,9003,10003),y3=c(-3,-6,-9,-12,-15,-18,-21,-24,-27,-30))
我想在ggplot2中绘制三个散点图,具有相同的独立variable(x)
和三个不同的依赖variables(y1,y2,y3)
。然后向他们添加连续的geom_vline(geom_vline(xintercept=3.2))
,如下图所示,但我不知道该怎么做。有没有人可以帮助我?