gpt4 book ai didi

r - 以对角线显示 R 相关矩阵中的数字

转载 作者:行者123 更新时间:2023-12-02 07:34:22 27 4
gpt4 key购买 nike

我正在使用

生成相关矩阵
library(psych)
corMat = cor(data)
cor.plot(corMat,numbers=TRUE,colors=TRUE,n=51,main=NULL,labels=NULL)

但想要更改它,以便热图中显示的数字按对角线显示。

最佳答案

我可能误解了,但如果你只想旋转文本标签,你可以通过更改 cor.plot 的源代码来实现,特别是行 text(rx, ry, round (r * 100))text(rx, ry, round(r * 100), srt=45),给出如下内容: enter image description here

关于r - 以对角线显示 R 相关矩阵中的数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18344691/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com