Recently a few neat uses of ggplot2 have come up, and either partial or full solutions have been posted:
I am not certain that I agree with your analysis. I'll explain why, and will then point you to some resources for writing your own geoms.
ggheat
As far as I can tell, ggheat
returns an object of class ggplot
. Thus it is a convenient wrapper around ggplot, customised for a specific use case. Although qplot
is far more generic, it does in principle the same thing: It is a wrapper around ggplot
that makes some informed guesses about the data and chooses sensible defaults. Hadley calls this plot functions and it is described briefly on page 181 of the ggplot2 book.
curly braces
The curly brace solution does exactly what the ggplot
philosophy says, i.e. separate data from presentation. In this case, the data is generated by a little custom function and is stored in a data.frame
. It is then displayed using a geom that makes sense, i.e. geom_line
.
quo vadis?
You have noted (in the r chat room) that you would prefer to have a more generic approach to plotting the curly braces. Something along the following lines (and I paraphrase and extend at the same time):
geom
, such as geom_custom_shape
This sounds like a nice generalisation and extension of the ideas behind the curly brace solution, and would clearly require writing a new geom. There is an official ggplot wiki, where you can find instructions for creating a new geom.