[R] Graphic device & graphics primitives

Greg Snow Greg.Snow at imail.org
Thu Jan 29 22:13:52 CET 2009


Sigbert,

The plot2script function in the TeachingDemos package does essentially what Duncan talks about for you.  Create your plot then run the function giving it a filename to save the info into (or run without arguments and then past into a script window or text editor (only tested on windows, if this does not work, go with the filename option)).  The same warnings (and possibly more) apply, but this lets you see the steps to recreate the plot (and you can try modifying some parts and running the script as a way to update the plot).

One thing this tends to show is the number and type of steps that the plotting process gets broken down into.  

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Duncan Murdoch
> Sent: Thursday, January 29, 2009 4:25 AM
> To: Sigbert Klinke
> Cc: r-help at r-project.org
> Subject: Re: [R] Graphic device & graphics primitives
> 
> Sigbert Klinke wrote:
> > Hi,
> >
> > I know that some graphics devices in R store graphics primitives such
> > that a redraw is possible (e.g. when resizing the window). Is it
> > possible to get the current number of stored graphic primitives?
> >
> > Thanks in advance
> >
> > Sigbert Klinke
> >
> > ______________________________________________
> > 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.
> >
> You could examine the results of recordPlot, but note the warnings that
> the format is not guaranteed to be stable across R versions.
> 
> Duncan Murdoch
> 
> ______________________________________________
> 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.




More information about the R-help mailing list