[R] Problem with graphics device in Mac OS X

Bryan Hanson hanson at depauw.edu
Mon Dec 10 21:47:06 CET 2007


For whatever reason, on the Mac, you have to open a new Quartz device window
before making the graphics call.  So, from the menu, pull down under Window
to New Quartz Device Window.  Then all graphics calls go to that (initially
empty) window, and any further calls replace the previous contents of the
window.  This window doesn't print so well, but your students can divert
their output to a pdf easily for really nice plots.

BTW, people were reporting problems with OS 10.5 and R.  These may have been
fixed, but if you have trouble, it's discussed in the archives.

Bryan


On 12/10/07 3:37 PM, "WAYNE KING" <king.812 at osu.edu> wrote:

> Hello List,
>    I am teaching a basic course where students are encouraged to use R. There
> are a few students using Mac OS X. As a test we downloaded and installed the
> latest .dmg file (R-2.6.1.dmg) onto a intel Mac running 10.5.1. A device query
> yields
> 
>> getOption("device")
> "quartz"
> 
> But any plot command does not bring up a plot (e.g. plot(), boxplot(),
> hist()).
> 
> I found a thread concerning X11 windows under Mac OS X but I feel these users
> will most likely be just using the native quartz device.
> 
> Invoking a call to quartz() first does not seem to help, e.g.
> 
>> quartz()
>> plot(rnorm(100,0,1))
> 
> produces no output and no error message (Nothing happens). A call to dev.cur()
> seems to indicate a device is active.
>> quartz()
>> dev.cur()
> quartz
> 2
> 
> but again a plot command produces no figure. Sorry am I not a Mac OS user and
> I did check the archives but found mostly discussions on X11() under Mac OS X.
> 
> Wayne
> 
> ______________________________________________
> 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