[R] Flattening Graphics

Paul Murrell p.murrell at auckland.ac.nz
Thu Feb 11 22:14:33 CET 2010


Hi


baptiste auguie wrote:
> Hi,
> 
> You could try the grid.grab() function in R devel if your graphics use
> the Grid package. It will read the graphical output as a bitmap which


grid.grab() does NOT grab a bitmap version of the current picture.  It 
grabs all of the (grid-rendered) grobs in the current picture.  You 
might be thinking of grid.cap(), which is currently only in the 
development version of R.  But if you want a raster version of the 
current plot, it would make more sense to use a raster device, like png().

Paul


> you can then export in a multipage pdf. It may not be really
> flattening per se but that would definitely help with the viewing
> speed.
> 
> 
> HTH,
> 
> baptiste
> 
> On 11 February 2010 05:42, Dario Strbenac <D.Strbenac at garvan.org.au> wrote:
>> Hello,
>>
>> This question is a nightmare to search for, as I get so many irrelevant results. What I'm interested in doing if I have many pages of plots and I want to keep them together in the same document, say a PDF, is there a way to flatten all the dot plots and graphics, so that they don't take a long time to load on a slow computer in Adobe Reader, without using external programs outside of R ?
>>
>> Thanks,
>>       Dario.
>>
>> -------------------------------------------------
>> Dario Strbenac
>> Research Assistant
>> Cancer Epigenetics
>> Garvan Institute of Medical Research
>> Darlinghurst NSW 2010
>> Australia
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/



More information about the R-help mailing list