R在png中保存图,但不在pdf中

时间:2018-06-07 21:24:35

标签: r pdf acrobat

我试图将玩具地块保存在文件中。它适用于png,但不适用于pdf。 pdf简直是空的。

width =  1144
height = 995

png("deleteme.png", width = width, height = height)
op=par(mar = c(0, 0, 0, 0))
plot(c(0, width), c(0, height), type = "n", xlab = "", ylab = "",xaxs = "i",yaxs = "i")
lines(c(1,2,3,4)*100, c(3,2,3,5)*100)
dev.off()

pdf("deleteme.pdf", width = width, height = height)
op=par(mar = c(0, 0, 0, 0))
plot(c(0, width), c(0, height), type = "n", xlab = "", ylab = "",xaxs = "i",yaxs = "i")
lines(c(1,2,3,4)*100, c(3,2,3,5)*100)
dev.off()

这是png:enter image description here

这是pdf:http://docdro.id/wG9xx3J

pdf显示chrome中的行,但不显示Acrobat!

0 个答案:

没有答案