Rstudio图片保存方式

    技术2022-07-11  104

    Rstudio图片保存方式

    Rstudio经常保存的格式有两种:png 和 pdf 常用的方法有两种

    方法一

    png(file = "filename",width = 1200,hight = 1200) # 打开设备,设置参数 plot() # 画图 dev.off() # 关闭设备

    方法二

    当使用 ggplot2 画图时,经常使用 ggsave() 进行图片的保存

    ggsave(filename,plot = 需保存的文件名称,dpi = 300,width = 5,height = 10)
    Processed: 0.010, SQL: 9