保存相关图的问题:维度

时间:2018-04-16 01:34:17

标签: r r-corrplot

过去我保存了ggplot2,但保存后的相关图失去了它的尺寸,我无法理解为什么。

让上下文成为这段代码:

cor.matrix <- structure(c(1, 0.492955134006126, 0.506712693586509, 0.492955134006126, 1, 0.467841635024973, 0.506712693586509, 0.467841635024973, 1), .Dim = c(3L, 3L), .Dimnames = list(c("(0)0003", "(0)0005", "(0)0006"), c("(0)0003", "(0)0005","(0)0006")))

par(oma=c(6,3,4,3), cex.axis = 0.9, mar = c(3,5,3,2), mgp = c(1,0.4,0))
cairo_pdf("Test.pdf", 10,12)

corrplot::corrplot(cor.matrix,method = "color", order = "alphabet", cl.pos = "b", tl.pos = "n")

title(main="Correlation Matrix Between Bus Lines",outer=T, cex.main = 2, font.main = 3 , family = "Georgia", adj = 0.5)  
title( sub = paste0("Alphabet Order"), outer = T, cex.sub = 1.5)

dev.off()

输出是下图,我必须拍摄一个屏幕截图,因为默认格式是 .pdf

问题出现了,因为即使我认为我在par函数的height参数,widthcairo_pdf参数中尝试了很多变量,输出也没有变化

请您帮我理解我必须做什么,以便在图像中使用tittle + subtitle?

enter image description here

0 个答案:

没有答案