Preparing plots for publication
The plotting capabilities of R are excellent; however, when I am preparing a figure for publication, I often need to combine multiple plots or add objects (e.g., arrows or text) to an existing plot. While this can be accomplished in R, my patience for tweaking layout parameters tends to run out quickly. I searched around and found a nice solution using open source software (an example with Matlab plots is described here
1) Create the desired figure in R and export as an eps file:
2) Install the necessary software on your computer, and then convert the image file to one more easily edited.
sudo aptitude install pstoedit tgif
#clean up the eps file so it is more easily read
eps2eps myfig.eps myfig2.eps
#convert the eps file to a tgif object
pstoedit -f tgif myfig2.eps myfig2.obj
3) Edit the new file myfig2.obj in tgif.
To leave a comment
for the author, please follow the link and comment on his blog: Quantitative Ecology
offers daily e-mail updates
news and tutorials
on topics such as: visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook