[R-SIG-Mac] saving graphic in quartz window with Aquamacs/ESS

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Feb 24 16:45:59 CET 2008

On Sun, 24 Feb 2008, Simon Urbanek wrote:

> Graham,
> On Feb 24, 2008, at 5:02 AM, Graham Smith wrote:
>> After a few false starts, I have aquamacs and emacs working together. I 
>> have X11 running and CarbonEL running. In retrospect I now wonder 
>> whether I need X11 running. I have been using R on Windows before 
>> (without Emacs or ESS, so this is all very new)
>> To create a plot I seem to need to first open a quartz window 
>> "quartz()" and then run the plot command.
>> Which is fine, except I can't work out how to save the graphic, I am 
>> used to right clicking on the graphic for a context menu (but that 
>> doesn't work- no context menu popup) or using the R-console menu, which 
>> doesn't exist with the Aquamacs/ESS set up.
> With Aquamacs you're pretty much on your own - Quartz is meant to be
> run from the R GUI where it has all the menus for saving, copy/paste
> etc as well as quartz.save(). ESS does not support the 'real' Quartz
> that is used in the R GUI.
> We may change that in the future such that Quartz windows can have its
> own menus, but currently [R <=2.6.x] it's not supported, because all
> the UI functionality is provided by the R GUI, not by R itself.

Windows has a savePlot() function to save the current screen device 
contents to a file format.  R 2.7.0 will have a similar function for its 
new X11() device (but only to a bitmap format, and currently only to PNG), 
and it ought to be possible to extend that to the new quartz() device.

The X11() device does not have menus either -- that would need far more 
X11 support that we assume (just Xlib, no toolkits, even Xt is optional).

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-SIG-Mac mailing list