Can I show only a part of my heatmap e.g. the upper part?

329 Views Asked by At

I have a big dataset with around 1000 significant hits calculated by anova. I can draw a beautiful heatmap using the pheatmap package. However, the heatmap is huge and I would like to look at bigger clusters in more detail. Can I somehow hide parts of the heatmap?

I have extracted clusters using cutree and made a heatmap with those. However, since part of the data is missing, the clustering is different. I really just want to hide the upper/lower/left/right part instead of recalculating the clustering with part of the data.

Let's say for example I have this pheatmap:

data(iris)
iris_heatmap <- iris[-5] %>% scale()
iris_heatmap <- iris_heatmap %>% as.data.frame()
pheatmap(as.matrix(iris_heatmap))

but instead of the whole picture being shown I only want to see this: cut pheatmap

I just dont want to cut the picture myself but have R do it.

Many thanks for your help!!

0

There are 0 best solutions below