[R] Beginner graphics device questions.

rkevinburton at charter.net rkevinburton at charter.net
Mon Sep 8 19:59:17 CEST 2008


Please forgive me if this has been asked before but I could not readily find an answer. First, from the example I was able to determine that graphics device commands such as plot can be redirected using 'png' and 'bmp' type commands. I tried this and it works as I understand it. The question is how this graphics device works. If I issue another 'plot' command will it also be redirected to the 'png' device? Does dev.off essentially reset the graphics device to the default? Second there is a note that if the name of the file does not contain %d then every plot will essentially overwrite the previous plot. So I think I can see how to get 'plot1.bmp', 'plot2.bmp', etc. What if I want a finer control over the name of the graphics file? What if I want to specify a name? Something like 'plotA.bmp', 'plotB.bmp', etc. ? Would I essentially have to call 'png' (or 'bmp' etc.) with a file name and then call dev.off?

Thank you.

Kevin



More information about the R-help mailing list