geom_boxplot(outlier.colour = "black") # Assign custom color ch+scale_color_manual(values=c("#999999", "purple", "#33FFFF", "red", "green", "brown")) # Assign brewer color ch+scale_color_brewer(palette="Dark2") # Assign gray scale ch+scale_color_grey() + theme_classic() 输出...
此外:geom_boxplot(outlier.size = 0.5) 和 geom_point(size = 0.5) 这两个函数中散点大小需要保持一致。 Step5:配对小提琴图 ggplot(data, aes(x = Group, y = Expression, color = Group)) + geom_violin(size = 1) + geom_line(aes(group = paired), color = "grey80", size = 0.5) + g...
1、边界散点图(Scatterplot With Encircling) 2、边缘箱图/直方图(Marginal Histogram / Boxplot) 3、拟合散点图(Scatterplot) 4、计数图(Counts Chart) 5、分组气泡图(Bubble plot) 6、相关系数图(Correlogram) 7、水平发散型文本(Diverging Texts) 8、水平棒棒糖图(Diverging Lollipop Chart) 9、去棒棒糖图(Di...
e2 <- e + geom_boxplot(aes(color = dose)) + theme_minimal()e2 + scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))调色板 e2 + scale_color_brewer(palette="Dark2")e2 + scale_color_grey()改变填充色 e3 <- e + geom_boxplot(aes(fill = dose)) + theme_minimal(...
(jitter.width=0.35,jitter.height=0,dodge.width=0.8))+geom_boxplot(alpha=0.2,width=0.45,position=position_dodge(width=0.8),size=0.75,outlier.colour=NA)+geom_violin(alpha=0.2,width=0.9,position=position_dodge(width=0.8),size=0.75)+scale_color_manual(values=cbPalette)+theme_classic()+theme(...
#绘制箱线图 p=ggboxplot(data, x="Gene", y="Expression", color = "geneCluster",#根据分型结果定义颜色 xlab="",#x轴名称 ylab="Gene expression",#y轴名称 legend.title="geneCluster",#图例标题 palette = bioCol,#颜色 width=1) p=p+rotate_x_text(60)#x轴倾斜角度 ...
p<-ggboxplot(ToothGrowth,x="supp",y="len",# 配色方案 ?ggboxplotcolor="supp",palette="aaas",add="jitter")# Add p-valuep1=p+stat_compare_means()#defaultWilcoxonp2=p+stat_compare_means(method="t.test")p1+p2 (2)标签显示格式
geom_boxplot(fill='orange') #1.2 箱形图设置异常点及图形调色(outlier.x参数控制异常点) ggplot(singer,aes(x=voice.part,y=height)) + geom_boxplot(fill = "white", color = "darkgreen", outlier.color = "red", #控制边线颜色 outlier.fill = "orange", ...
axis.ticks = element_blank()) + # Centre plot title scale_fill_brewer(palette = "Dark2") # Color palette 5. Composition 成分图 Waffle Chart 华夫图 展示总人口的种类构成 虽然没有直接的函数 但是可以通过巧妙地使用 geom_tile()函数实现 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
e+geom_boxplot() 1. 添加有缺口的箱线图 e+geom_boxplot(notch = TRUE) 1. 按dose分组映射给颜色 e+geom_boxplot(aes(color=dose)) 1. 将dose映射给填充颜色 e+geom_boxplot(aes(fill=dose)) 1. 按supp进行分类并映射给填充颜色 ggplot(ToothGrowth, aes(x=dose, y=len))+ geom_boxplot(aes(...