How to save figures/plots from R Graphics window
Issue #864
resolved
Hey everyone, I am new to R. Once the graphs are generated, how do I save them into a file? I have attached the screenshot of the R Graphics window. It does not give me any option to save the plots.
Thanks in advance.
Comments (3)
-
-
reporter Thank you so much!
-
- changed status to resolved
- Log in to comment
Hi,
You can direct the plot to a pdf, for example, by
You can also generate a png, tiff, etc. in a similar manner. Check the doc for the corresponding command (e.g.,
?pdf
)Alternatively, you can type the following command after seeing the plotting window, to save the figure as is:
dev.copy2pdf(file="XXX.pdf")