gpt4 book ai didi

r - 将相关矩阵图形保存为 PDF

转载 作者:行者123 更新时间:2023-12-04 12:01:04 24 4
gpt4 key购买 nike

我有一个用 corrplot 创建的相关矩阵对象

p1 <- corrplot(correlations_history, method = "number", type = "lower", title = "Regional Factor Correlation Matrix over history", mar = c(0,0,1,0), number.cex = 0.5, number.digits = 2)

我正在尝试将其另存为 pdf。出于某种原因,我无法弄清楚如何做到这一点。任何帮助表示赞赏。谢谢!

最佳答案

启动 pdf 图形驱动程序,然后调用您的绘图。

pdf(file = "yourfilename.pdf")

corrplot(correlations_history, method = "number", type = "lower",
title = "Regional Factor Correlation Matrix over history",
mar = c(0,0,1,0), number.cex = 0.5, number.digits = 2)

dev.off()

关于r - 将相关矩阵图形保存为 PDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50631646/

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