| 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
cola character or integer vector specifying up to 10 line colours (see the
parmanpage for details). Values of shorter vectors are recycled as necessary.ltya character or integer vector specifying up to 10 line styles (see the
parmanpage for details). Values of shorter vectors are recycled as necessary.lwda numeric vector specifying up to 10 line widths (see the
parmanpage for details). Values of shorter vectors are recycled as necessary.pcha character or integer vector specifying up to 10 plot symbols. Values of shorter vectors are recycled as necessary.
barcola 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.bwthe line colours used in B/W mode (
bw=TRUE)lty.bwthe line styles used in B/W mode (
bw=TRUE)lwd.bwthe line widths used in B/W mode (
bw=TRUE)pch.bwthe plot symbols used in B/W mode (
bw=TRUE)barcol.bwthe bar colours used in B/W mode (
bw=TRUE)bwif
TRUE, plots are drawn in B/W mode unless specified otherwise (default:FALSE, i.e. colour modedeviceplot device used by the
zipfRplotutils (seezipfR.begin.plotfor details). Currently supported devices arex11(default on most platforms),eps,pdf, as well aspngandquartzwhere available (default on Mac OS X).init.parlist of named graphics parameters passed to the
parfunction whenever a new viewport is created withzipfR.begin.plotwidth,heightdefault 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