次のコードを使用して、偏りのない階層的クラスタリングを実行しようとしています
col.cell <- c("purple","orange", "green", "blue")[sampleinf$subtype]
heatmap.2(as.matrix(hm3),col=rev(morecols(50)),trace="none", main="Top 500 most variable genes across samples",ColSideColors=col.cell,scale="row")
legend("topright",
legend = unique(sampleinf$subtype),
col = col.cell,
lty= 1.5, lwd = 2,
cex=.6)
色の凡例をより見やすくするにはどうすればよいですか。デンドログラムと重ね合わせます。