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

标签 r plot r-corrplot

我有一个用 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/

相关文章:

r - 缩进而不在RMarkdown中添加项目符号点或数字

r - 如何让 R corrplot 标题位置正确?

matlab - 如何在MATLAB上与音频文件同步地使用移动的光标绘制图形

R corrplot 裁剪底轴标签

R corrplot colorlegend 变化范围

r - 多次调用同一个 Rcpp 函数时返回不同的结果

R Shiny 设置DataTable列宽

r - 可视化 iGraph 和标签对齐

python - 通过使用 matplotlib 或 seaborn 循环列表来更新图形/绘图

python - pandas df.plot.scatter 失败但 df.plot 生成绘图