I am trying to insert vertical and horizontal lines at desired co-ordinates inside a heatmap produced by pheatmap
in R
.
mat <- matrix(rnorm(200*200),200,200)
pheatmap(mat,treeheight_row = 0, treeheight_col = 0,
col= colorRampPalette(c("gray", "white", "lightcoral"))((50)))
grid.lines(x=c(50,100,150),y=c(50,100,150))
I would like to insert 3 horizontal lines at y = c(50,100,150)
and 3 vertical lines at x = c(50,100,150)
. Using 'grid.lines' this way (?) does not help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.