qplot and anti-aliasing in R

后端 未结 4 660
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 03:47

I am using ggplot2 library and am working with the qplot command I know I can save my output as an anti-aliased image file by using the following command after my qplot

4条回答
  •  庸人自扰
    2021-02-07 04:13

    As others have mentioned, R's built-in Windows graphics device does not do anti-aliasing. But nowadays it's easy to install the Cairo graphics device which does.

    At the R console:

    install.packages('Cairo',,'http://www.rforge.net/')
    

    To test:

    plot(rnorm(1000)) # non-antialiased (on Windows)
    library('Cairo')
    CairoWin()
    plot(rnorm(1000)) # antialiased!
    

    More

提交回复
热议问题