Learn R Programming

zipfR (version 0.6-5)

zipfR.par: 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 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

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).

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.

See Also

plot.spc, plot.vgc, zipfR.begin.plot, zipfR.end.plot

Examples

Run this code
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

Run the code above in your browser using DataLab