Saving a high resolution image in R

前端 未结 2 1446
梦谈多话
梦谈多话 2021-01-30 08:23

I\'m creating a scatterplot using ggplot in R (R version 3.2.1). I want to save the graph as a tiff image in 300 DPI in order to publish it in a journal. However, my code using

2条回答
  •  心在旅途
    2021-01-30 09:01

    A simpler way is

    ggplot(data=df, aes(x=xvar, y=yvar)) + 
    geom_point()
    
    ggsave(path = path, width = width, height = height, device='tiff', dpi=700)
    

提交回复
热议问题