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? (I ask because I have a complicated image computation that takes about 1-2 hrs to complete. I would like to view, then save it to file if I like it) 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) Thanks very much for any help! Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Bill Simpson <wsimpson at uwinnipeg.ca> writes:> 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? > > (I ask because I have a complicated image computation that takes about 1-2 > hrs to complete. I would like to view, then save it to file if I like it)I think you'll be happy a few split seconds after typing ?save.plot (and ?print.plot)> 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)Sorry, no. Some of the external PostScript manipulators *might* be able to do this. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._