Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 871 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 871 Bytes

ggsave

Why you should prefer Cairo's png engine; visual proof.

In the past, copying plots from RStudio Plots pane to some document was a pain in the ass, having to deal with horrible graphics quality. I thought that problem was caused by my RStudio version, some issue with my pc or even by Windows. Turns out it's a mix, because RStudio's default PNG engine for Windows produces ugly plots.

Here's what I mean

ggsave(filename = "images/iris_default.png", plot = p,
       height = 5, width = 7, units = "in", dpi = 500)

ggsave(filename = "images/iris_default.png", plot = q,
       height = 5, width = 7, units = "in", dpi = 500, type = "cairo")