代码之家  ›  专栏  ›  技术社区  ›  Tomas

postscript设备的默认字体大小

  •  1
  • Tomas  · 技术社区  · 10 年前

    我正在使用postscript设备生成R中的eps图形,类似于(简化的):

    require(extrafont)
    #font_import() # I did it only once when installing new fonts
    # see http://www.fromthebottomoftheheap.net/2013/09/09/preparing-figures-for-plos-one-with-r/
    loadfonts(device = "postscript")
    postscript("elev.eps", width = 70/25.4, height = 75/25.4,
               family = "Myriad Web Pro", paper = "special", onefile = FALSE,
               horizontal = FALSE)
    barplot(krk$counts, space=0, horiz=T, cex.axis = 0.7)
    dev.off()
    

    现在我的问题是关于我试图使用的字体大小 cex.axis ,用一种笨拙的方式。我应该有8号字体的轴标签。我能告诉postscript设备我想要基本字体大小=8吗?一、 对于cex=1,我希望字体大小为8。我只找到了 cex 参数,相对于 某物 我甚至不知道该怎么做,更不用说设置。。。

    PS:我试过了 ?postscript 但还没有找到答案

    1 回复  |  直到 10 年前
        1
  •  2
  •   IRTFM    10 年前

    这在我的设备上产生了预期的字体大小的弹药。

    postscript("elev.eps", width = 70/25.4, height = 75/25.4,
                paper = "special", onefile = FALSE,
               horizontal = FALSE, pointsize=8)
    barplot(1,1, space=0, horiz=T, cex.axis = 0.7)
    dev.off()
    

    enter image description here

    (该图像与我的pdf查看器中显示的图像旋转了90度,但我认为您的问题与水平论点无关。)