raivokolde / pheatmap

Pretty heatmaps
225 stars 83 forks source link

change line width of dendrogram in pheatmap in R and add annotation _row #58

Open Mohsin0911 opened 5 years ago

Mohsin0911 commented 5 years ago

i used this coding but i can't fix it. `library(pheatmap) library(grid)

data<- read.csv("C:/Users/Hp/Desktop/16 s. heat excel.csv", sep=",", header = T, row.names = "x")

mycol<- colorpanel(75, "blue", "white", "red")

with border

pheatmap(data,col=mycol,cellwidth = 18,cellheight = 15, fontsize_row =12, fontsize_col = 13,angle_col = "45", trace="none", cluster_cols = T, cluster_rows = T)

p <-pheatmap(data,col=mycol,cellwidth = 18,cellheight = 15, fontsize_row =12, fontsize_col = 13,angle_col = "45", trace="none", cluster_cols = T, cluster_rows = T)

p$gtable$grobs[[2]]$gp <- gpar(lwd = 5) p$gtable$grobs[[1]]$gp <- gpar(col = 'blue')

png('pheatmap_gpar.png', height = 400, width = 400) grid.newpage() grid.draw(p$gtable) dev.off() heatmap help.docx

Rplot01--fin

`