Search code examples
rplotquartz-graphics

Quartz device: plot is cutoff by default


Does anyone have any insight as to why the plot region would be cut off by default using the Quartz device?

% R --vanilla
> plot(1,1)

gives me this;

enter image description here

The plot settings are normal

> par("mar")
[1] 5.1 4.1 4.1 2.1

and running quartz.options(reset=TRUE) doesn't seem to change anything. What did I mess up?? Note this is a not a problem using the X11 device.

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Solution

  • Comment by @rawr spurred me in the right direction...

    The size of the device is too large relative to the screen resolution. I used

    setHook(packageEvent("grDevices", "onLoad"), 
      function(...) grDevices::quartz.options(width = 6, height = 6))
    

    in ~/.Rprofile to reduce the defaults (from 7x7).