df = read.table('supplyment table.txt',header = T,sep = '\t',check.names = F)
library(heatmaps)
#row.names(df) =df[,1] #读取数据时,没有将第一列作为列名,这两部改一下
#df = df[,-1]
p1=pheatmap(df, show_colnames=T, show_rownames=T, frotsize=2, color = colorRampPalette(c("navy", "white", "firebrick3"))(200),annotation_legend=T,border_color='white',cluster_rows = F,cluster_cols = F,cellwidth = 30,cellheight = 15)# pheatmap参数的详解见pheatmap 参数整理_bannerDr的博客-CSDN博客_pheatmap
#保存图片
p1
library(ggpubr) #利用这个包保存图片,其他格式祥见R语言导出图片为png、jpg、tiff、pdf、ppt格式_编码农夫的博客-CSDN博客_r语言导出图片
ggsave("p1.tiff",width = 6,height = 5)
tiff('p1.tiff',width = 1200,height = 1000,units = 'px')
p1
dev.off()