[R] Publication-ready figures in R?
Rainer M Krug
Rainer at krugs.de
Tue Jan 28 16:04:03 CET 2014
-----BEGIN PGP SIGNED MESSAGE-----
On 01/28/14, 12:12 , Bebber, Dan wrote:
> 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.
As you say, publisher requirements are different, and Journal
requirements as well. So I don't think it is a good idea to change the
default values - correction: I think it would be a *very bad* idea!
What you could do, is write a package which wraps plot functions in
wrappers which set the wanted par values. But these would depend on
range, how many data series in a plot, if I want color, and so on - so
you might end with *numerous* new plot functions.
I don't think it is necessary as the graphs can be easily adapted to
the publishers need (as you say).
Better idea: use the graph gallery http://rgraphgallery.blogspot.fr/
to add example graphs with the required settings for each Journal.
> 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
> Therefore my question is: Could the default plotting functions be
> amended to make it easier for users to produce publication-ready
> Dan Bebber
> Department of Biosciences University of Exeter
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
> posting guide http://www.R-project.org/posting-guide.html and
> provide commented, minimal, self-contained, reproducible code.
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the R-help