R provides several frameworks for composing figures. Base graphics is the simplest, `grid` is more advanced, and the `lattice`/`ggplot` packages provide convenient abstractions of the `grid` graphics system. Multi-element figures can be readily created in base graphics using either `par()` or `layout()`, with analogous functions available in `grid`. Mixing the two systems is a little more complicated, somewhat fragile, but entirely possible.

I recently needed to combine base+grid graphics on a single page; two sets of base graphics on the left, and the output from `xyplot()` (`grid`) on the right. Following some tips from Paul Murrell posted on r-help, the solution was fairly simple. A truncated example of the processes is listed below, corresponding to the attached figure. While the result was “good enough” for a quick summary, there are clearly some improvements that would make figure more useful.

**Mehrten Soil Summary**

read more

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** dylan's blog**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...