qplot and anti-aliasing in R

后端 未结 4 648
被撕碎了的回忆
被撕碎了的回忆 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:37

    If you have Cairo installed (see the other answers), to save it as an anti-aliased PNG, just change your code to:

    ggsave(file="filename.png", type="cairo-png")

    as specified here.

    But for what purpose do you want to "see a plot on the monitor as anti-aliased graph" or "anti-alias my plot windows"? If you mean like in the Plots window (tab) in RStudio, I am not sure that can be done, it serves basically just as a preview. I suggest you save the graph to a file and then use this file to display it or for any other purpose.

提交回复
热议问题