quartz starts a graphics device driver for the OS X System.
It supports plotting both to the screen (the default) and to various
graphics file formats.
quartz(title, width, height, pointsize, family, antialias, type, file = NULL, bg, canvas, dpi)
quartz.options(..., reset = FALSE)
quartz.save(file, type = "png", device = dev.cur(), dpi = 100, ...)"Quartz %d". A C-style format for an integer
will be substituted by the device number (see the file
argument to postscript for further details).7.7.12."Arial". This will
be the base name of a font as shown in Font Book.TRUE."native".NULL, selects a default name where one is needed. See
Details for more information."transparent". An opaque colour such as "white" will
normally be required on off-screen types that support transparency
such as "png" and "tiff"."white", and will be forced to be an opaque colour.NA_real_)
for an on-screen display defaults to the resolution of
the main screen, and to 72 dpi otherwise. See Details.quartz except file.quartz are set
by quartz.options: the Arguments section gives the
factory-fresh defaults. The Quartz graphics device supports a variety of output types.
On-screen output types are "" or "native" or
"Cocoa". Off-screen output types produce output files and
utilize the file argument. type = "pdf" gives PDF
output. The following bitmap formats may be supported (depending on
the OS version): "png", "jpeg", "jpg",
"jpeg2000", "tif", "tiff", "gif",
"psd" (Adobe Photoshop), "bmp" (Windows bitmap),
"sgi" and "pict".
The file argument is used for off-screen drawing. The actual
file is only created when the device is closed (e.g., using
dev.off()). For the bitmap devices, the page number is
substituted if a C integer format is included in the character string,
e.g.\ifelse{latex}{\out{~}}{ } Rplot%03d.png. (The result must be less than
PATH_MAX characters long, and may be truncated if not. See
postscript for further details.) If a file
argument is not supplied, the default is Rplots.pdf or
Rplot%03d.type. Tilde expansion
(see path.expand) is done.
If a device-independent R graphics font family is specified (e.g.,
via par(family =) in the graphics package), the Quartz device
makes use of the Quartz font database (see quartzFonts) to
convert the R graphics font family to a Quartz-specific font family
description. The default conversions are (MonoType TrueType versions
of) Helvetica for sans, Times-Roman for
serif and Courier for mono.
On-screen devices are launched with a semi-transparent canvas. Once a
new plot is created, the canvas is first painted with the
canvas colour and then the current background colour (which can
be transparent or semi-transparent). Off-screen devices have no
canvas colour, and so start with a transparent background where
possible (e.g., type = "png" and type = "tiff") --
otherwise it appears that a solid white canvas is assumed in the
Quartz code. PNG and TIFF files are saved with a dark grey matte
which will show up in some viewers, including Preview.
title can be used for on-screen output. It must be a single
character string with an optional integer printf-style format that
will be substituted by the device number. It is also optionally used
(without a format) to give a title to a PDF file.
Calling quartz() sets .Device to "quartz"
for on-screen devices and to "quartz_off_screen" otherwise.
The font family chosen needs to cover the characters to be used:
characters not in the font are rendered as empty oblongs. For
non-Western-European languages something other than the default of
"Arial" is likely to be needed---one choice for Chinese is
"MingLiU".
quartz.save is a modified version of dev.copy2pdf
to copy the plot from the current screen device to a quartz
device, by default to a PNG file.
quartzFonts, Devices. png for way to access the bitmap types of this device
via R's standard bitmap devices.