R Heatmap

绘图数据

data = (scale(mtcars))

简单热图

heatmap(data, scale = "none")

调色板

library("RColorBrewer")
col <- colorRampPalette(brewer.pal(10, "RdYlBu"))(256)

heatmap(data, scale = "none", col = col, RowSideColors = rep(c("blue", "pink"), each = 16), 
        ColSideColors = c(rep("purple", 5), rep("orange", 6)))

增强热图

library("gplots")
heatmap.2(data, scale = "none", col = bluered(100), 
          trace = "none", density.info = "none")

交互式热图

library(d3heatmap)
d3heatmap(data, colors = "RdBu", k_row = 4, k_col = 2)

你可能感兴趣的:(R)