HTH,
baptiste
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
ggplot2 and lattice produce plots using grid graphics, where one can
separate the production of grobs (GRaphical OBjects) that can be
stored as a description of the plot, and the actual drawing where
these grobs are pushed onto the device. With raw grid objects this is
the distinction between,
g = grid::rectGrob() # create a rectangle, draw nothing
grid::grid.draw(g) # draw it
ggplot2 and lattice work at a higher level, and define a print()
method to display the graphics description containing many grobs and
viewports. In the interactive read-eval-print R session, objects are
printed when their name is invoked on the command line. This is not
the case within a function, or in non-interactive mode, hence the need
to explicitely call print().
HTH,
b.
?annotation_custom
which, among other things, allows you to use ggsave() to conveniently
save the two plots at once.
b.