多个面板的分辨率更高

时间:2014-09-10 20:04:18

标签: r

我想用R制作出版质量(300 dpi)的图像,我看过这些Preparing publication-quality figures in R with more than one panelArrange many plots using gridExtra,但我想知道是否有一些更普遍的东西?

如果我们已经打印到设备,我们如何将相同的东西打印到高分辨率文件(最好是tiff)?

当我尝试将图像保存为.eps时,它似乎在R的结尾处起作用,但我无法在任何地方打开图像。我一直在做的是打印到pdf,然后在成像软件(gimp)中打开pdf,然后导出与.tiff相同的图像。但是,根据最近的数据,pdf分辨率还不够好。

似乎拥有多个面板确实使问题变得复杂,我们都会以不同的方式创建多面板图形(在gridgridExtra中也是如此)。

因此,假设有人已成功将他们的图像传达给常规绘图设备,那么在高分辨率文件中捕获相同内容的最佳方法是什么?

不是一个很好的例子,但这是我试图创建的整页图:

vplayout<- function(x,y)
   viewport(layout.pos.row=x, layout.pos.col=y)

pdf("CC Calibrations Deluxe.pdf", width = 6.5, height = 9)
grid.newpage()
pushViewport(viewport(layout = grid.layout(8,3, heights = unit(c(2.5, 2.5,      
      2.5,2.5,2.5,2.5,2.5,.5),"null"), widths = unit(c(.5,5,2.5), "null"))))
grid.text((expression(paste("Soil Moisture (mm mm" ^ "-1",")"))), rot = 90, 
      vp = viewport(layout.pos.row = 3:7, layout.pos.col = 1), gp=gpar(fontsize=18))
grid.text((expression(paste("Dry Mass (kg m" ^ "2",")"))), rot = 90,
      vp = viewport(layout.pos.row = 1:2, layout.pos.col = 1), gp=gpar(fontsize=18))
grid.text("Year", vp = viewport(layout.pos.row = 8, layout.pos.col = 1:2), gp=gpar(fontsize=18))
print(cc.bio, vp = vplayout (1,2))
print(cc.yield, vp = vplayout(2,2))
print(cc5sw, vp = vplayout (3,2))
print(cc10sw, vp = vplayout(4,2))
print(cc15sw, vp = vplayout (5,2))
print(cc35sw, vp = vplayout (6,2))
print(cc75sw, vp = vplayout (7,2))
print(comp.bio.cc, vp = vplayout (1,3))
print(comp.yield.cc, vp = vplayout(2,3))
print(comp5.cc, vp = vplayout (3,3))
print(comp10.cc, vp = vplayout(4,3))
print(comp15.cc, vp = vplayout (5,3))
print(comp35.cc, vp = vplayout (6,3))
print(comp75.cc, vp = vplayout (7,3)))
dev.off()

通过图像软件运行后的结果如下。这些点是圆圈,在R设备(开罗)上不是空的。

enter image description here

0 个答案:

没有答案