[R] packGrob and dynamic resizing

hadley wickham h.wickham at gmail.com
Fri Sep 25 16:52:39 CEST 2009


On Fri, Sep 25, 2009 at 7:55 AM, baptiste auguie
<baptiste.auguie at googlemail.com> wrote:
> Thank you Paul, I was convinced I tried this option but I obviously didn't!
>
> In ?packGrob, the user is warned that packing grobs can be slow. In
> order to quantify this, I made the following comparison of 3
> functions,
>
> - table1 uses frameGrob and packGrob
> - table2 uses frameGrob but calculates the sizes manually and uses placeGrob
> - table3 creates a grid.layout and draws the grobs in the different viewports.
>
> The three functions have (almost) the same output, but the timing does
> differ quite substantially !

This matches my experience with ggplot2 - I have been gradually moving
away from frameGrob and packGrob because doing the placement myself is
much faster (and for most of the cases I'm interested in, the full
power of packGrob is not needed)

Hadley

-- 
http://had.co.nz/




More information about the R-help mailing list