I am trying to save plot which I generated using ggplot in R. I saved with .jpeg, .pdf, .png formats. But none of them look good when I try to resize it for putting it on a presentation slide. Could someone suggest what is the best format to save those plots in order to look good on slides?
Just a comment: For publication-ready images, you should always generate via vector-based transformations (SVG, PDF, etc) and not pixel-based (BMP, JPEG, TIFF, PNG, etc). The top journals will flat out reject pixelated images because they cannot easily be manipulated and look terrible when one zooms in.
The pdf and postscript option yields files that you can additionally edit in Illustrator, whereas tiff gives a high-res image file that's much better than typical jpegs or png files. These commands won't show the plots, but will save them directly to the file specified.
This command will plot the last plot you made. As I am using Jupyter notebook/lab it's very handy when you just find the perfect combination of width and heigh with the command
options(repr.plot.width = 12, repr.plot.height = 6)
I used to use the pdf() + dev.off() set, but the thing is that you save running time with the notebooks using this single-line approach.
Use SVG format. https://assessingpsyche.wordpress.com/2013/07/27/keeping-beautiful-r-graphs-beautiful-in-powerpoint/
Alternatively, you could try setting the resolution and dimensions when saving in e.g. jpeg:
We also like to use EPS because we edit our figures in Adobe Illustrator and it's annoying to work with SVG files in Illustrator.
Oh, this is also a great solution. I had no idea about the
svg
toemf
conversion and thatemf
was an Office-preferred format.Perfect. Thank you so much!
Just a comment: For publication-ready images, you should always generate via vector-based transformations (SVG, PDF, etc) and not pixel-based (BMP, JPEG, TIFF, PNG, etc). The top journals will flat out reject pixelated images because they cannot easily be manipulated and look terrible when one zooms in.
I always default to using PDF.