A recent conversation on Twitter reminded me of a powerful way to edit graphs created in R inside PowerPoint:
— Mick Watson (@BioMickWatson) January 5, 2015
I realise that R is incredibly powerful anyway, and that much of this can be done within R, but I am also painfully well aware that R is hard, and that many users prefer “point-and-click”.
This example uses Windows.
1. In R, let’s create a graph:
data(iris) plot(iris$Sepal.Length, iris$Sepal.Width, main="My Graph", xlab="Width", ylab="Length")
2. You should see something like the graph below. In the top left hand corner, choose File -> Save As -> Metafile, and save it somewhere convenient
5. Now repeat step 4. Right click the image, choose group -> ungroup:
Every single part of the graph is now selectable, moveable and editable! Click outside of the chart area to de-select everything, and then click on individual components to edit them. In the graph below I have changed the title, and given one of the data points a red background:
(I realise there are other ways to do this, perhaps better ways e.g. export as PDF then edit in Illustrator (thanks @bioinformagic)! This post is really aimed at those familiar and comfortable with PowerPoint :-))