| zipfR.par {zipfR} | R Documentation |
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.
zipfR.par(..., bw.mode=FALSE)
... |
either character strings (or vectors) specifying the names
of parameters to be queried, or parameters to be set in
name=value form, or a single list of named values. A listing
of valid parameter names is given below. |
bw.mode |
if TRUE and parameter values are queried, then
return the corresponding parameters for B/W mode if possible (e.g.,
zipfR.par("col",bw.mode=TRUE) returns the value of the
col.bw parameter). Note that bw.mode cannot be
abbreviated in the function call! |
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.
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).
colpar manpage for
details). Values of shorter vectors are recycled as necessary.ltypar manpage for
details). Values of shorter vectors are recycled as necessary.lwdpar manpage for details). Values of shorter
vectors are recycled as necessary.pchbarcolcol.bwbw=TRUE)lty.bwbw=TRUE)lwd.bwbw=TRUE)pch.bwbw=TRUE)barcol.bwbw=TRUE)bwTRUE, plots are drawn in B/W mode unless
specified otherwise (default: FALSE, i.e. colour modedevicezipfR plotutils
(see zipfR.begin.plot for details). Currently
supported devices are x11 (the default), eps,
pdf, as well as png and quartz where
available.init.parpar function whenever a new viewport is created with
zipfR.begin.plotwidth, heightzipfR.begin.plot
plot.spc, plot.vgc,
zipfR.begin.plot, zipfR.end.plot
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