标签: r plot r-corrplot
我在R中使用corrplot绘制相关系数矩阵,但我的相关范围仅为0.95到1.00,我不知道如何设置颜色调色板的下限和上限。
corrplot(segCorr, order = "hclust", tl.cex = .6, cl.lim = c(0.95, 1), col=colorRampPalette(c("blue","white","red"))(10))
尽管设置一切都是一种颜色,但我需要看到细节上的这些细微差别。
答案 0 :(得分:3)
A" hack"我有时会使用以避免花费太多时间设置一个好的颜色 - 托盘是设置is.corr = FALSE。然后我们来自
is.corr = FALSE
with(mtcars, corrplot(cor(cbind(disp, hp, cyl)), cl.lim = c(0.7, 1)))
为...
with(mtcars, corrplot(cor(cbind(disp, hp, cyl)), cl.lim = c(0.7, 1), is.corr = FALSE))