[R] ggplot2 - suggestion for facet_wrap/grid

hadley wickham h.wickham at gmail.com
Wed Dec 3 14:27:38 CET 2008


Hi David,

> facet_wrap and facet_grid function are both very usefull. But they are
> perhaps a bit redundant.

I disagree ;)  Conceptually they are rather different: facet_wrap is
essentially a 1d layout, while facet_grid is a 2d layout.  This has
implications for how you specify the faceting, how the facets are
labelled, and how the scales can vary.  While I could probably force
both into a single function, this is rather against the philosophy of
ggplot2, which strives towards small objects which only do one thing.
This tends to make things a little more verbose, but I think it makes
things easier to understand.

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list