最简单的解决方案是增大保存文件的高度和宽度。这里有些例子。请看看结果如何不同。
library(GGally)
library(data.table)
sample_data <- data.table(a = rnorm(1000))
for(i in 2:12) sample_data[, letters[i] := rnorm(100) ]
head(sample_data)
g <- ggpairs(sample_data,
upper = list(wrap(ggally_cor, size = 2)))
ggsave("temp1.pdf", g, width = 6, height = 6)
ggsave("temp2.pdf", g, width = 9, height = 9)
ggsave("temp3.pdf", g, width = 12, height = 12)
ggsave("temp1.png", g, width = 6, height = 6)
ggsave("temp2.png", g, width = 9, height = 9)
ggsave("temp3.png", g, width = 12, height = 12)