美文网首页R语言学习
ggplot2中绘制线图,以y轴顺序连接点

ggplot2中绘制线图,以y轴顺序连接点

作者: Stat_lysis | 来源:发表于2022-11-25 00:28 被阅读0次

    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