« Google uses R to predict economic activity | Main | Bellkor wins Netflix Prize »

September 22, 2009


Feed You can follow this conversation by subscribing to the comment feed for this post.

A very nice example, and a beautiful figure. One question - what about lattice? Conditioning has long been a part of lattice, no for-loops required. With the new lattice book just out, I'm beginning to question how complete the overlap between ggplot and lattice is, and whether I'll be switching graphics systems *again*, or if the ywo packages are synergistic.

I personally still like lattice. Tons of flexibility - I make lots of non-traditional plots that I wouldn't want to begin to describe with the grammar of graphics. Some would probably say that if this is the case, these must not be good plots, but I know what I'm doing.

Don't get me wrong - I think ggplot is a nice piece of software but I don't see it as a replacement for lattice -- just another way to do things. I hope all the hype ggplot is getting doesn't send lattice into oblivion. One problem I have with it is that it's pitched as being superior to lattice instead of an alternative - "taking all the good and leaving the bad"...

The arguments made against lattice don't really add up. One of these is that "lattice lacks a formal model, which can make it hard to extend" - actually, a formal model can be constraining. Also, "lattice uses a formula-based interface... formula does not generalise well to more complicated situations" - unless I'm missing something, ggplot plots are always of the form qplot(x, y, ...) + faceting, etc. How is this any different from y ~ x | var? Any "complicated" stuff can be handled with a panel function, or in ggplot, by adding more elements. In my experience, lattice deals very well with complicated situations.

Lattice is more mature. At the moment, it is considerably faster (although HW has said that he hopes to work on this). It has some capabilities that ggplot does not (3d plots, control of aspect ratio/"banking", ...) It is probably easier to customize -- I find the guts of ggplot pretty hard to comprehend.

Besides its shiny newness, the thing I like most about ggplot is that one can generally go a lot farther with the built-in functionality before starting to write custom panel functions (as in lattice). I especially like the ability to combine different data sets/data sets and model predictions on a single plot, which I have always found difficult in lattice.

The comments to this entry are closed.

Search Revolutions Blog

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr