这篇博文写的很好 https://www.r-bloggers.com/exporting-nice-plots-in-r/
介绍的 Inkscape 也很好用,解决了之前IGV输出SVG图片的问题。导入PPT只显示一半。用Ai cc 打开,报错。“往返Tiny时剪贴将丢失”,只有框架没有图
There are two main problems when exporting graphics from R:
- Anti-aliasing is not activated in Windows R (this does not apply to Linux or Mac) – windows下没有反锯齿设置,解决:library(Cairo)
- When increasing the resolution the labels automatically decrease and become unreadable –分辨率升高,标签会自动缩小
If we want to increase the resolution of the plot we can’t just change the resolution parameter:
We also have to change the point size, the formula is size * new resolution DPI / 72 DPI:
If we double the image size we also need to double the point size:
1 | # https://www.r-graph-gallery.com/265-grouped-boxplot-with-ggplot2/ |