ggplot2绘图

Pheatmap也可以拼图

2018-08-30  本文已影响109人  一路向前_莫问前程_前程似锦

tiff(file = "heatmap.tiff", width = 4200, height = 2500, units = "px", res = 300)
p2=pheatmap(heatdata, #热图的数据
cluster_rows = TRUE,#行聚类
cluster_cols = F,#列聚类,可以看出样本之间的区分度
#annotation_col =annotation_col, #标注样本分类
#annotation_legend=TRUE, # 显示注释
show_rownames = F,# 显示行名
scale = "row", #以行来标准化,这个功能很不错
#color=colorRampPalette(c("navy", "white", "firebrick3"))(100),
color=colorRampPalette(c("green","black","red"))(100),
#color =colorRampPalette(c("blue", "white","red"))(100),#调色
#filename = "heatmap_F.pdf",#是否保存
cellwidth = 60, cellheight = 1.3,# 格子比例
fontsize = 10
)
dev.off()

拼图

library(cowplot)

plot_grid(p2gtable, p1gtable, p3$gtable, nrow=1, labels=c('A', 'B', 'C'),label_size = 16,align = c("v"), label_y = 0.93) #Or labels="AUTO"

R 小技巧

CTRL+shift +R


image.png

里面填上文字即可,比如我写的111,点击ok

image.png
上一篇 下一篇

猜你喜欢

热点阅读