美文网首页
上三角/下三角 表格

上三角/下三角 表格

作者: LET149 | 来源:发表于2025-10-05 23:19 被阅读0次
library(corrplot)

mt_used <- cor(mtcars)

corrplot(as.matrix(df_used_here),
         type = "upper",     '#只画上三角
         method = "number",     #格子里是数值
         diag = FALSE,     #不包含对角线
         addgrid.col = "black",     #格子线的颜色
         tl.col = "black",     #行名列名的颜色
         tl.cex = 1,     #行名列名的大小
         tl.srt = 90,     #列名的角度
         number.cex = 1.2,     #格子中数值的字体大小
         number.font = 2)     #格子中数值的字体;2 为黑体

Note: 可以用 cl.pos = "n" 来指定移除图例

相关文章

网友评论

      本文标题:上三角/下三角 表格

      本文链接:https://www.haomeiwen.com/subject/sfdktstx.html