[R] Publication-ready figures in R?

Bebber, Dan D.Bebber at exeter.ac.uk
Tue Jan 28 12:12:00 CET 2014

I would like to make a plea for "publication-ready" figures from R.
The default figures produced by R (both traditional and lattice graphics) need to be amended (by users) in many respects to be acceptable by publishers.
I imagine that most R users are producing figures for publication, and it seems inefficient that so many adjustments need to be made.
Although publishers vary in their requirements, there is a general request for minimal whitespace, and labelling of figure parts with a, b, c etc. in the top left corner that should be easy to achieve in R.

For traditional graphics the main issues relate to white space, which could be reduced by e.g. par(mar =c(3,3,1,1), mgp = c(2,0.5,0), las = 1, tcl = -0.25) as defaults
Labelling parts inside the plot region can be achieved by e.g. legend("topleft", legend = "A", bty = "n", x.intersp = 0, y.intersp = 0).
Labelling parts outside the plot region can almost be achieved by e.g. mtext("A", side = 3, adj = 0), although the label is too far to the right, rather than being in the top left corner.

For lattice graphics, whitespace can be reduced by adjusting trellis parameters as has been discussed previously, e.g.

However, labelling panels in lattice with a,b,c etc. in the top left corner seems extremely difficult and involved, as has been discussed previously e.g.

Although the lattice strips are very useful for identifying panels, publishers (in my field, at least) never allow this kind of labelling.

Therefore my question is: Could the default plotting functions be amended to make it easier for users to produce publication-ready graphics?

Dan Bebber

Department of Biosciences
University of Exeter

More information about the R-help mailing list