R Scale plot elements within PDF of set width and height

前端 未结 4 364
刺人心
刺人心 2021-02-02 10:46

Though R plots sent to a PDF can be rescaled at will in an illustration or page layout software, scientific journals often insist that the plots provided have specific dimension

4条回答
  •  失恋的感觉
    2021-02-02 11:35

    An option equally good or better than pdf is tiff. All journals I have come across like tiff.

    tiff(filename="name.tiff", width=5, height=5, units="in",
         pointsize=8, compression="lzw", bg="white", res=600,
         restoreConsole=TRUE)
    qplot(data=iris, x=Petal.Width, y=Petal.Length, colour=Species)
    dev.off()
    

    If you are on linux, drop restoreConsole=TRUE, seems only windows likes that.

提交回复
热议问题