我在R中製作了一個美麗的情節用於科學期刊。根據期刊的規格,我需要一個嵌入字體的eps文件格式。由於R不會導出帶有嵌入字體的eps文件,因此我正在使用基本圖形調用embedFonts()
對其進行轉換。但是,這個調用正在改變我的身材的邊界框。在下面這個簡單的例子中,白色空間被裁剪。在我的經OCD調整後的出版質量情節中,由於我已經將它完美地調整到了邊緣,所以增加了空格。embedFonts正在改變我R圖的邊界框
我想嵌入字體,但其他所有東西都保持不變!
下面是一個例子:
setEPS()
postscript(file = "~/Desktop/test.eps", family = "Helvetica", colormodel = "srgb", width = 5, height = 3)
plot(x = 1:10, y = 1:10, col = "red", main = "Keep everything the same but embed my fonts!")
dev.off()
embedFonts(file = "/Users/athena/Desktop/test.eps", format = "eps2write", outfile = "/Users/athena/Desktop/stupid.eps")
到目前爲止,我有:
- 使用自制安裝ghostscript的:$ brew install ghostscript
- 得知embedFonts
需求的完整路徑,沒有蒂爾達的允許
- 指定的格式「eps2write」,因爲默認的「ps2write」將其改爲後記
我花費了很多努力在「可重複研究」上使用開放數據,開放代碼,開放期刊,bla bla bla ...我真的不想讓我的最終數字使用插圖轉換或什麼:(
也許這R郵件列表線程可以幫助:http://r.789695.n4.nabble.com/eps-file-with-embedded-font-td903387.html – neilfws