xfig {grDevices} | R Documentation |
XFig Graphics Device
Description
xfig
starts the graphics device driver for producing XFig
(version 3.2) graphics.
It was deprecated in R 4.4.0: consider using an SVG device for editable graphics.
The auxiliary function ps.options
can be used to set and view
(if called without arguments) default values for the arguments to
xfig
and postscript
.
Usage
xfig(file = if(onefile) "Rplots.fig" else "Rplot%03d.fig",
onefile = FALSE, encoding = "none",
paper = "default", horizontal = TRUE,
width = 0, height = 0, family = "Helvetica",
pointsize = 12, bg = "transparent", fg = "black",
pagecentre = TRUE, defaultfont = FALSE, textspecial = FALSE)
Arguments
file |
a character string giving the file path. For use
with See section ‘File specifications’ in the help
for |
onefile |
logical: if true allow multiple figures in one file. If false, assume only one page per file and generate a file number containing the page number. |
encoding |
The encoding in which to write text strings. The
default is not to re-encode. This can be any encoding recognized by
|
paper |
the size of paper region. The choices
are |
horizontal |
the orientation of the printed image, a logical. Defaults to true, that is landscape orientation. |
width , height |
the width and height of the
graphics region in inches. The default is to use the entire
page less a 0.5 inch overall margin in each direction. (See
|
family |
the font family to be used. This must be one
of |
pointsize |
the default point size to be used. |
bg |
the initial background color to be used. |
fg |
the initial foreground color to be used. |
pagecentre |
logical: should the device region be centred on the page? |
defaultfont |
logical: should the device use XFig's default font? |
textspecial |
logical: should the device set the textspecial flag for all text elements? This is useful when generating pstex from XFig figures. |
Details
Although xfig
can produce multiple plots in one file, the XFig
format does not say how to separate or view them. So
onefile = FALSE
is the default.
The file
argument is interpreted as a C integer format as used
by sprintf
, with integer argument the page number.
The default gives files ‘Rplot001.fig’, ..., ‘Rplot999.fig’,
‘Rplot1000.fig’, ....
Line widths as controlled by par(lwd =)
are in multiples of
5/6*1/72 inch. Multiples less than 1 are allowed. pch = "."
with
cex = 1
corresponds to a square of side 1/72 inch.
Windows users could make use of WinFIG (http://winfig.com/, shareware).
Conventions
This section describes the implementation of the conventions for graphics devices set out in the ‘R Internals’ manual.
The default device size is the paper size with a 0.25 inch border on all sides.
Font sizes are in big points.
The default font family is Helvetica.
Line widths are integers, multiples of 5/432 inch.
Circle radii are multiples of 1/1200 inch.
Colours are interpreted by the viewing/printing application.
Note
Only some line textures (0 <= lty < 4
) are used. Eventually this
may be partially remedied, but the XFig file format does not allow as
general line textures as the R model. Unimplemented line textures
are displayed as dash-double-dotted.
There is a limit of 512 colours (plus white and black) per file.
Author(s)
Brian Ripley. Support for defaultFont
and textSpecial
contributed by Sebastian Fischmeister.
See Also
Devices
,
postscript
,
ps.options
.