Tuesday, January 17, 2023

Plot Save Options


  1. Open a graphics device.
  2. Create the plot.
  3. Close the graphics device.
 

pdf("mygraphs/myplot.pdf",width=5,height=5)
plot(x,y)
dev.off()
Another way to plot, is first to make a plot and then save

plot(x,y)
dev.copy(pdf,"mygraphs/myplot.pdf",width=7,height=5)
dev.off()

No comments:

Post a Comment