Re: [R] packGrob and dynamic resizing

2009-09-28 Thread Paul Murrell
Hi I could speculate, but what would be more useful would be some profiling results. If you could try Rprof() on your examples (and post me the results directly), that would provide some useful information to see if some speed-ups could be made. Paul baptiste auguie wrote: Hi, I just

Re: [R] packGrob and dynamic resizing

2009-09-26 Thread baptiste auguie
Hi, I just tried a fourth variant, closer to what ggplot2 uses (I think): to each grob is assigned a viewport with row and column positions (in my example during their construction, with ggplot2 upon editing), and they're all plotted in a given grid.layout. The timing is poor compared to pushing

Re: [R] packGrob and dynamic resizing

2009-09-25 Thread baptiste auguie
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

Re: [R] packGrob and dynamic resizing

2009-09-25 Thread hadley wickham
On Fri, Sep 25, 2009 at 7:55 AM, baptiste auguie baptiste.aug...@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

Re: [R] packGrob and dynamic resizing

2009-09-24 Thread Paul Murrell
Hi baptiste auguie wrote: Dear all, I'm trying to follow an old document to use Grid frames, Creating Tables of Text Using grid Paul Murrell July 9, 2003 As a minimal example, I wrote this, gf - grid.frame(layout = grid.layout(1, 1), draw = TRUE) label1 - textGrob(test, x = 0, just =

[R] packGrob and dynamic resizing

2009-09-20 Thread baptiste auguie
Dear all, I'm trying to follow an old document to use Grid frames, Creating Tables of Text Using grid Paul Murrell July 9, 2003 As a minimal example, I wrote this, gf - grid.frame(layout = grid.layout(1, 1), draw = TRUE) label1 - textGrob(test, x = 0, just = left, name=test)