zipfR.begin.plot opens a new plotting window or image file of
the specified dimensions (width, height), using the
selected graphics device (device). Background colour
(bg) and default point size (pointsize) are set as
requested. Then, any global graphics parameter settings (defined with
the init.par option of zipfR.par) are applied.
See the zipfR.par manpage for the "factory default"
settings of these options.
zipfR.end.plot finalizes the current plot. For image file
devices, the device will be closed, writing the generated file to
disk. For screen devices, the plotting window remains visible until a
new plot is started (which will close and re-open the plotting
window). The main purpose of the zipfR plotting utilities is to make it
easier to draw plots that are both shown on screen (for interactive
work) and saved to image files in various formats. If an Rscript
specifies filenames in all zipfR.begin.plot commands, a
single global parameter setting at the start of the script is
sufficient to switch from screen graphics to EPS files, or any other
supported file format.
The factory-default graphics device is x11, which is available
on all major platforms (sometimes as an alias for a native device).
On Mac OS X, the Aqua GUI version of Rdefaults to the quartz
device, which produces higher-quality images.
The png bitmap device may not be available on all platforms,
and may also require access to an X server. Since the width and
height of a PNG device have to be specified in pixels rather than
inches, zipfR.begin.plot translates the width and
height settings, assuming a resolution of 150 dpi. Use of
the png device is strongly discouraged. A better way of
producing high-quality bitmaps is to generate EPS image (with the
eps device) and convert them to PNG or JPEG format with the
external pstoimg program (part of the latex2html
distribution).
zipfR.pick.device will issue a warning if multiple flags
matching supported graphics devices are found. However, it is not an
error to find no matching flag, and all unrecognized strings are
silently ignored.