2020-04-13
2020-04-13 本文已影响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