2
我想要在熱圖上將一個堆疊barplot作爲列註釋。我使用ComplexHeatmap
。製作堆疊barplot作爲註釋時只有一個條塊
這是barplot輸入(富):
V1 V2 V3
1 28.50 67.30 0.00
2 0.00 63.90 25.40
3 16.30 67.80 15.90
4 24.10 75.30 0.00
5 0.00 70.90 20.60
6 18.90 62.50 13.90
7 19.80 68.70 11.50
8 22.60 64.90 10.10
9 28.10 66.80 0.00
10 16.60 74.30 0.08
11 0.14 79.90 0.06
12 23.70 0.71 0.00
13 26.70 66.60 0.00
14 16.80 58.20 20.60
15 13.30 82.20 0.00
16 0.32 61.70 6.30
17 21.50 62.20 0.14
爲簡單起見,我已刪除了其他註釋和熱圖,只是使「麻煩」註釋情節。這是我的代碼:
library(ComplexHeatmap)
ha = HeatmapAnnotation(barplot = anno_barplot(foo), annotation_height = unit(30,"mm"))
hm = Heatmap(zero_row_mat, top_annotation = ha)
hm
讀ComplexHeatmap
參考手冊,我本來期望的堆疊barplot因爲我的輸入是一個matrix
(超過1個柱) ,但是我只能得到一個酒吧。我無法弄清楚我做錯了什麼。有任何想法嗎?
我仍然沒有得到一個堆疊的barplot,只有一個酒吧。 (http://imgur.com/5klhhyi) –
不確定。我想,先更新所有的軟件包。那麼,你可以嘗試使用'DF'在基本R中製作一個堆疊的barplot嗎? – CPak