简体   繁体   English

如何在RStudio中从Viewer保存高分辨率.png?

[英]How to save high resolution .png from Viewer in RStudio?

是否有一个功能类似ggsaveggplots从在RStudio观众节省了高清晰度的图片?

Not sure if this is what you are looking for, but you might directly use the available graphic devices and write your plot into a file, eg, as follows (check ?device for other file formats): 不确定这是否是您要寻找的,但是您可以直接使用可用的图形设备,然后将绘图写入文件中,例如,如下所示(检查?device是否为其他文件格式):

# specify the device / file format (and start device)
png(file = "myplot.png")
plot(1:2, 1:2, type = "l")
#turn off the device
dev.off()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM