p1<-ggplot(data.r2,aes(x=abs(r),y=Variable,
colour=factor(type),
shape=factor(type)))+
geom_point(size=3)+
geom_line(orientation = "y",size=1,
aes(group=type)) ###orientation 更改为y,否则以x轴顺序连接。
p1<-ggplot(data.r2,aes(x=abs(r),y=Variable,
colour=factor(type),
shape=factor(type)))+
geom_point(size=3)+
geom_line(orientation = "y",size=1,
aes(group=type)) ###orientation 更改为y,否则以x轴顺序连接。
本文标题:ggplot2中绘制线图,以y轴顺序连接点
本文链接:https://www.haomeiwen.com/subject/pcptfdtx.html
网友评论