December 4, 2015

Note that the list of packages below would be updated as soon as we find a new package. If you know a package that should be in the list, please feel mention it in the disqus section that follows the list.

Why use R to produce graphics?

S, R’s ancestor, was first designed to be an interactive interface for calling routines from the SCS (Statistical Computing Subroutines) FORTRAN library. It expanded to be a complete programming language dedicated to data manipulation, statistical analysis and data visualization (see A brief History of S). Today’s graphical system of R is directly derived from the one of S. When R is installed, you get from it two base packages, ‘graphics’ and ‘grid’, which produce graphics that are exported with the grDevices package. These packages are very complete and flexible. They allow users to efficiently create graphics that scientists use in their day to day operations, i.e. scatterplots, box plots, histograms, etc. We consider that the ‘graphics’ package is somewhat more user-friendly than the trickier ‘grid’ package which offers better facilities to develop new graphical functions (e.g. grid’ has been employed to build ggplot2). Recently, the gridGraphics package has been developed to bridge the gap between ‘grid’ and ‘graphics’ packages.

That being said, the advantages are numerous and more can be built in. For instance:

You get all the advantages linked with using R, i.e. it is free, lot of documentation exists, a very large community of users, there are many packages, it is easy to learn.

Any kind of graphics a scientist needs has already been implemented by many contributors (see the packages review below). If you find there is room for improvement or that we are mistaken, all information is available to further develop missing plotting functions or correct existing ones.

Almost everything is possible. All graphics are fully customizable. Some time is required to learn the works, but it’s worth it.

Although there may be many good reasons to use software to post-treat graphics R produces in WYSIWYG softwares, we contend that once you master R, you will never do so. When a graphics is done, it is associated with only a few lines of code. Changing solely the lines of code is a much more efficient way more efficient to solve any problem than reproducing and post-treating the graphics. As scientists, it is a victory to only modify a few lines of code when reviewers quibble about a figure.

Once a graphics is created, we can export it in many formats: .eps, .jpeg, .pdf, .bmp, .svg with appropriate resolution and size. There is 100% guarantee that you will meet a journal’s requirements for figures publication.

Documentation

We will make the content below ‘evolving’ by collecting and indexing as many sources of documentation as possible. Please comment in the Disqus section below to suggest and/or provide your own sources: