zipfR.par {zipfR} | R Documentation |
Set or Query Graphics Parameters (zipfR)
Description
Set default graphics parameters for zipfR
high-level plots and
plot utilities, similar to par
for general graphics parameters.
The current parameter values are queried by giving their names as
character strings. The values can be set by specifying them as
arguments in name=value
form, or by passing a single list of
named values.
NB: This is an advanced function to fine-tune zipfR
plots. For basic plotting options (that are likely to be sufficient
for most purposes) see plot.spc
and
plot.vgc
instead.
Usage
zipfR.par(..., bw.mode=FALSE)
Arguments
... |
either character strings (or vectors) specifying the names
of parameters to be queried, or parameters to be set in
|
bw.mode |
if |
Details
Parameters are set by specifying their names and the new values as
name=value
pairs. Such a list can also be passed as a single
argument to zipfR.par
, which is typically used to restore previous
parameter values (that have been saved in a list variable).
Most of the default values can be manually overridden in the high-level plots.
zipfR.par()
shows all parameters with their current values, and
names(zipfR.par())
produces a listing of valid parameter names.
Value
When parameters are set, their former values are returned in an
invisible named list. Such a list can be passed as a single argument
to zipfR.par
to restore the parameter values.
When a single parameter is queried, its value is returned directly. When two or more parameters are queried, the result is a named list.
Note the inconsistency, which is the same as for par
: setting
one parameter returns a list, but querying one parameter returns a
vector (or a scalar, i.e. a vector of length 1).
zipfR Graphics Parameters
col
a character or integer vector specifying up to 10 line colours (see the
par
manpage for details). Values of shorter vectors are recycled as necessary.lty
a character or integer vector specifying up to 10 line styles (see the
par
manpage for details). Values of shorter vectors are recycled as necessary.lwd
a numeric vector specifying up to 10 line widths (see the
par
manpage for details). Values of shorter vectors are recycled as necessary.pch
a character or integer vector specifying up to 10 plot symbols. Values of shorter vectors are recycled as necessary.
barcol
a character or integer vector specifying up to 10 colours for the bars in non-logarithmic spectrum plots. Values of shorter vectors are recycled as necessary.
col.bw
the line colours used in B/W mode (
bw=TRUE
)lty.bw
the line styles used in B/W mode (
bw=TRUE
)lwd.bw
the line widths used in B/W mode (
bw=TRUE
)pch.bw
the plot symbols used in B/W mode (
bw=TRUE
)barcol.bw
the bar colours used in B/W mode (
bw=TRUE
)bw
if
TRUE
, plots are drawn in B/W mode unless specified otherwise (default:FALSE
, i.e. colour modedevice
plot device used by the
zipfR
plotutils (seezipfR.begin.plot
for details). Currently supported devices arex11
(default on most platforms),eps
,pdf
, as well aspng
andquartz
where available (default on Mac OS X).init.par
list of named graphics parameters passed to the
par
function whenever a new viewport is created withzipfR.begin.plot
width
,height
default width and height of the plotting window opened by
zipfR.begin.plot
See Also
plot.spc
, plot.vgc
,
zipfR.begin.plot
, zipfR.end.plot
Examples
print(names(zipfR.par())) # list available parameters
zipfR.par("col", "lty", "lwd") # the default line styles
zipfR.par(c("col", "lty", "lwd")) # works as well
## temporary changes to graphics paramters:
par.save <- zipfR.par(bw=TRUE, lwd.bw=2)
## plots use the modified parameters here
zipfR.par(par.save) # restore previous values