0

Is there a function similar to ggsave for ggplots for saving high definition pictures from the viewer in RStudio?

elliot
  • 1,844
  • 16
  • 45

1 Answers1

1

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, e.g., as follows (check ?device for other file formats):

# 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()
Manuel Bickel
  • 2,156
  • 2
  • 11
  • 22