Hi Wincent,
Wow, that's a terrible example, but it illustrates that geditGrob will
return NULL if it can't find the named grob (I'm pretty sure I
complained to Paul about this but I forgot what the outcome was).
A better illustration is
p <- qplot(wt, mpg, data=mtcars, colour=cyl)
grob <- ggplotGrob(p)
grob2 <- geditGrob(grob, gPath("legend.text"), gp=gpar(fontface = "bold"))
grid.newpage()
grid.draw(grob2)
I'll add this to the book errata.
Hadley
--
http://had.co.nz/