TLDR: scripting plots is more reproducible and efficient long term
Thanks to a nice post by Meghan Duffy on the Dynamic Ecology blog (How do you make figures?), we have some empirical evidence that many figures made in R by ecologists are secondarily edited in other programs including MS Powerpoint, Adobe Illustrator, Inkscape, and Photoshop. I do not do this for two reasons: reproducibility and bonus learning.
R is nice because results are relatively easy to reproduce. It’s free, and your code serves as a written record of what was done. When figures are edited outside of R, they can be much more difficult to reproduce. Independent of whether I am striving to maximize the reproducibility of my work for others, it behooves me to save time for my future self, ensuring that we (I?) can quickly update my own figures throughout the process of paper writing, submission, rewriting, resubmission, and so on.
I had to learn this the hard way. The following figure was my issue: initially I created a rough version in R, edited it in Inkscape (~30 minutes invested), and ended up with a “final” version for submission.
Turns out that I had to remake the figure three times throughout the revision process (for the better). Eventually I realized I should to make the plot in R than to process it outside of R.
In retrospect, two things are clear:
Forcing myself to remake the figure exactly as I wanted it using only R had an unintended side effect: I learned more about base graphics in R. Now, when faced with similar situations, I can make similar plots much faster, because I know more graphical parameters and plotting functions. In contrast, point-and-click programs are inherently slow because I’m manually manipulating elements, usually with a mouse, and my mouse isn’t getting any faster.
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/mbjoseph/mbjoseph.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".