美文网首页
2020-04-13

2020-04-13

作者: 杏仁核 | 来源:发表于2020-04-13 15:23 被阅读0次

    作图记录

    ggplot(data = c) +geom_boxplot(mapping = aes(x = style, y = FAT4,fill=group))+
    theme(axis.text.x = element_text( size=10, angle = 90))
    
    image.png
    ggplot(data = c) +geom_boxplot(mapping = aes(x = style, y = log(FAT4),color=group))+theme(axis.text.x = element_text( size=10, angle = 90))
    
    image.png
    ggplot(data=c)+geom_bar(mapping = aes(x=style,fill=group))+theme(axis.text.x = element_text( size=10, angle = 90))
    #bar图统计变化,自动帮你计算个数count,也可以是prop
    
    
    image.png
    ggplot(c,aes(x=style,y=log(FAT4),color=group,fill=group))+geom_dotplot(binaxis='y', stackdir='center',dotsize = 0.2)+theme(axis.text.x = element_text( size=10, angle = 90))
    
    image.png
    image.png
    ?geom_jitter
    ggplot(data = c) +geom_boxplot(mapping = aes(x = style, y = log(FAT4),color=group))+
      geom_jitter(mapping = aes(x = style, y = log(FAT4),color=group),size=0.2)+
      theme(axis.text.x = element_text( size=10, angle = 90))
    
    image.png
    ggplot(c,aes(x=style,y=log(FAT4),color=group,fill=group))+geom_point(position =  position_dodge(1))+theme(axis.text.x = element_text( size=10, angle = 90))
    #position =  position_dodge(1),这个来控制让组之间的点分尅
    
    image.png

    相关文章

      网友评论

          本文标题:2020-04-13

          本文链接:https://www.haomeiwen.com/subject/wzkwmhtx.html