I spent some time yesterday tweaking a graph (sizes.png), but
eventually I had to do the finishing touch in illustrator
(sizes-groups.png). I can see nothing very special about the
annotations, but at the moment this would be an impossible task (for
me) using ggplot2 only. With raw grid, however, such a layout could be
possible. Lattice offers the advantage that you can directly access
the panel coordinates, and plot for example a panel.xyplot() alone in
whichever viewport you create. The books by Murrell and sarkar offer
some examples of interaction between lattice and grid, such as
creating a very weird looking legend next to the graph, or having an
arrow point from one viewport to the data in another.
Would it be doable to extend the level of interaction between Grid and
ggplot2 to cover such cases?
Thanks for any comments or suggestions,
baptiste
--
_____________________________
Baptiste Auguié
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag
______________________________
Well it's possible now - you just have to look at grid.ls and figure
out which viewport is which ;) Once I've rewritten the layout system
you should be able to get much better control over the individual
pieces. From an annotation perspective, the main complication is that
ggplot2 performs all the scale conversions, not grid, so that there is
no native scale in the panels, and I've yet to figure out a way around
this.
Hadley
Great, I can't wait to see these changes in use (i'm guessing it'll
take a lot of examples).
What would be lovely is a plot method for grid.ls() that creates a
graphical summary of the grid objects and viewports (each tree with a
given colour, say, and each object with a small text label attached to
it, and/or an SVG tooltip).
Thanks,
baptiste
Me too! Sounds like a great project ;)
Hadley