[R] no graphics windows

David Winsemius dwinsemius at comcast.net
Wed Dec 8 04:48:52 CET 2010

On Dec 7, 2010, at 9:07 PM, Carolyn Fitzsimmons wrote:

> I've downloaded R and started going through Appendix A in the R- 
> intro manual.
> When I use the plox command I expect to see a graphics window, but  
> there is
> none. I've searched the help archives and found that it might go to  
> a ps file?
> Can someone help me get the graphics window working?

Graphics device vary quite a bit between the three major OS-es that  
people are using. On a Mac (using the R-GUI) it is sometimes necessary  
to type quartz() at the command line; Other times it is also necessary  
to type plot.new(). The screen devices are different than the file  
plotting devices.  Quite honestly I am not able to give you a clear  
explanation when plot.new() is needed and when quartz() is more  
appropriate. I suspect that plot.new() does not change the device but  
rather initializes an open device, and that quartz() is generally what  
I should be using when in your situation. If I don't get the action I  
need with one, I try the other and so far I have not gotten into  
trouble.  You could be looking at:


Right now I had no plot window open. I typed quartz() at the command  
line (of the GUI) and a quartz window opens. If I close that window  
and type plot(1,1), a new window opens. with a single point. If I  
close that window and type dev.cur() I get:

null device

I do know that you should remember to always complete a file device  
output session with dev.off() or you end up with a useless file.

> Kind Regards, Carolyn
> 	[[alternative HTML version deleted]]
> ______________________________________________
> 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.

David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list