panel.border = element_rect(color ="black", fill = NA, size = 1), axis.title.y = element_blank(), axis.text.y = element_blank()) + scale_colour_gradientn(colors = c("#7795bc","white","#f0dd93","#bd4335")) pdf(paste0('path/DotPlot_', gene,'.pdf'), width = 22, he...
scale_color_gradientn(colours = viridis::viridis(20), limits = c(0,4), oob = scales::squish, name = 'log2 (count + 1)') dotplot 看上去,比最初好看了许多。这时我们已经调整完了表达量、数量,不过还有聚类可以再加上去 ggplot没有内置聚类树,但可以有以下几个选择: 直接用hclust对基因进行聚类...
colors.gradient <- c("#13c4cd","#ffffff","#b91192") DotPlot( pbmc, assay = "RNA", features = top_5$gene, #cols = c("white", "red"), #replaced with scale color function col.min = -2.5, col.max = 2.5, dot.min = 0, dot.scale = 3, idents = NULL, group.by = NULL,...
+ #两边留空labs(x="-Log10(PValue)",y=NULL)+guides(size=guide_legend(title="Gene count"),fill=guide_colorbar(title="GeneRatio"))+ggtitle(title)+theme_bw()+theme(panel.grid=element_blank(),panel.grid.major=element_line(color="gray",linetype="dashed"),panel.border=element_rect(color=...
Sequence length n: 4000000 Window size w: 4000 Modimizer sketch value: 1000 Plot Resolution r: 1000 Progress: |████████████████████████████████████████| 100.0% Completed Saved bed file to Chr1_cen_plots/Chr1:14M-18M.bed Plots created!
Seurat::DotPlot(sc, features=genes) + scale_colour_gradient2(low="steelblue", mid="lightgrey", high="darkgoldenrod1") and it works. Might try this or scale_colour_gradientn? Best wishes Katrin Dear Katrin, Thank you for your answer and suggestion for 3 color scales! But I don't ha...
p1<-DotPlot(sce2,features=unique(top5$gene),assay='RNA')+coord_flip()+#翻转theme(panel.grid=element_blank(),axis.text.x=element_text(angle=45,hjust=0.5,vjust=0.5))+#轴标签labs(x=NULL,y=NULL)+guides(size=guide_legend("Percent Expression"))+#legendscale_color_gradientn(colours=c('#...
scale_fill_gradientn(colours = c("grey", "gold", "red")) + #自定义配色 scale_y_continuous(position = "left", breaks = 1:nrow(df), labels = Hmisc::capitalize(rev(df$Description))) + #scale_x_continuous(breaks = c(3, 4,5,6), ...
p <- ggplot(df.plot,aes(x=features.plot,y = as.numeric(id),size = pct.exp, color = avg.exp.scaled))+ geom_point() + scale_size("% detected", range = c(0,10)) + #调整绘图点的相对大小 scale_color_gradientn(colours = viridis::viridis(20), guide = guide_colorbar(ticks.colour...
df$id<-factor(df$id,levels=clust$labels[clust$order])dotplot<-ggplot(df,aes(x=features.plot,y=id,size=pct.exp,color=avg.exp.scaled))+geom_point()+scale_size("% detected",range=c(0,6))+scale_y_discrete(position="right")+scale_color_gradientn(colours=viridis::viridis(20),guide=gui...