corrplot包里用corrplot函数画相关性热图设置legend的刻度cloffset
用法如下:
library(corrplot)
# 生成数据
set.seed(123)
mat <- matrix(rnorm(25), nrow = 5)
# 画相关性热图,设置cl.offset为0.5
corrplot(mat, type = "upper", method = "color", cl.offset = 0.5)
其中,cl.offset表示legend刻度的偏移量,可取值为0到1之间的任意数。默认值为0.1,设置为0.5时,刻度的位置会向中心靠拢一些。
原文地址: https://www.cveoy.top/t/topic/fsBT 著作权归作者所有。请勿转载和采集!