#breaks
bk <- seq(-9,9,0.01) # len: 1801
# 做热图:
pheatmap(data1,
scale = "none",
color = colorRampPalette(c("blue", "white", "red"))(length(bk)-1), # len: 1800
legend_breaks=seq(-9,9,1),
breaks=bk)
这样更准确更易懂,博主这个例子对初学者太难了