Re: R-beta: first view, then save plot or image?

Thomas Lumley (thomas@biostat.washington.edu)
Mon, 12 Jan 1998 10:08:02 -0800 (PST)


Date: Mon, 12 Jan 1998 10:08:02 -0800 (PST)
From: Thomas Lumley <thomas@biostat.washington.edu>
To: Bill Simpson <wsimpson@uwinnipeg.ca>
Subject: Re: R-beta: first view, then save plot or image?
In-Reply-To: <Pine.OSF.3.95.980112113142.7580A-100000@io.uwinnipeg.ca>

On Mon, 12 Jan 1998, Bill Simpson wrote:

> I know how to first set postscript output, then execute plot or image
> command to create a postscript file of a plot or image.
> 
> I was wondering if it is possible to first create the plot or image on
> screen so it can be viewed, THEN save it to file?  Without doing plot() or
> image() again?

There are save.plot() and print.plot() commands for the x11() driver that
save to a PostScript file. They are still a bit slow as they repeat the
primitive graphics operations that created the picture. This is
unavoidable if you want reasonable quality, since the screen image only
exists in 75dpi.
 
> Along a similar vein, is it possible to alter an image after it has been
> plotted on screen?  That is, first create image, then decide I want a
> different palette of colours, then alter it.  Again, is it possible to do
> without re-executing image()? (In my case, without waiting another 1-2hrs)

No.  Currently even resizing the window causes the image to vanish. It's
not really stored anywhere (except as a bitmap). 


(why does image() take so long? I've never had it take more than a couple
of minutes. If it the computation that is slow you could store the results
and redraw as often as you like) 

Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._