ploptions {plgraphics} | R Documentation |
The user can set (and get) "Session" options which influence the
behavior plgraphics functions, notably stamp()
.
ploptions(x = NULL, default = NULL, list = NULL, ploptions = NULL, assign = TRUE,...) .ploptions ploptionsDefault
x |
character (vector) of name(s) of ploptions.
If |
list |
a named list of options to be set |
default |
character vector of option names.
The named options will be set according to |
ploptions |
the list of options that should be modified |
assign |
logical: should the list be assigned to
|
... |
any ploptions can be defined or modified,
using |
Here is a list of the components of ploptionsDefault
,
describing the suitable alternative values to be set by calling
ploptions
:
very incomplete for the time being!!!
linewidthvector of lwd
values to be used for
the different line types (lty
). The package
sets lwd
to a value
ploptions("linewidth")[lty]*lwd
intending to balance
the visual impact of the different line types, e.g.,
to allow a dotted line to make a similar impression as a solid
line.
ticklengthvector of 4 scalars: tickmark length,
corresponding to par("tcl")
. The first 2 elements
define the length of the regular tickmarks, the other two,
of the “small” tichmarks given by
attr(ticksat, "small")
(ticksat
is a possible
attribute of each variable).
There are two elements each in order to define tickmarks that
cross the axis.
tickintervalsvector of length 2. The first element is the
desired number of tick intervals for axes, to be used as argument
n
in pretty
.
The second determines how many tick labels are shown in the same
way, and should therefore be smaller than (or equal to) the first.
gridlinescan be
– a logical indicating if gridlines should be drawn. If
TRUE
, gridlines will be drawn at the values given in
attr(.,"ticksat")
;
– a vector of values at which the gridlines should appear;
– a list of length 2 of such values;
– a named list. If a name equals the attribute varname
of either the x or y variable, the respective component will be
used.
smooth.lty, smooth.col
line type and color.
Note that if there is a smooth.group
factor,
group.lty
and group.col
are used.
smooth.lwd
line width. If of length 2 (or more),
the second element is the factor by which the line width is
reduced for simulated smooths (that is, for the second to the last
column of smoothline$y
). It defaults to 0.7.
smooth.xtrimproportion of fitted values to be trimmed off on
both sides when drawing a smooth line, either a number or a function
that takes the number of points as its argument.
The default is the simple function 2^log10(n)/n
.
The smoothing function may produce an attribute xtrim
that is used as an additional factor to smooth.xtrim
.
This is applied, e.g., to suppress trimming if a straight line is
fitted instead of a smooth by requiring smoothLm
as the
smoothing function.
condquant...Conditional quantiles for censored residuals.
condquantlogical: should bars be drawn for censored residuals?
If FALSE
, censored observations will be set to the median of
the conditional distribution and shown by a different plotting
character, see argument censored
of
ploptions
.
If NULL
, the standard plotting character will be used.
condquant.probrangerange for probabilities. If the probability corresponding to the censored part of the distribution is outside the range, bars will not be drawn.
condquant.palefactor by which the pcol
color
will be paled to show the points (condquant.pale[1]
)
and the bars (...[2]
).
For ploptions()
, a list of all set UserOptions sorted by name.
For ploptions(x)
, where x
is the name of a pl option,
a list of length one containing the option,
or NULL
if it is not such a name.
For uses setting one or more options, the important effect is a changed
list .ploptions
that is used by the pl
graphical
functions (if assign
is TRUE
).
The (invisibly) returned value is the same list, complemented by an
attribute "old"
containing the previous values of those ploptions
that have been changed.
This list is useful for undoing the changes, usually at the end of
graphical functions, to restore the previous status.
.ploptions
and ploptionsDefault
are lists of options.
The first one is generated whenever ploptions are set
(and assign
is TRUE
), and is then
stored in the ".GlobalEnv"
environment.
The second is stored in the package plgraphics
.
In contrast to the options
of R base,
the plptions
are stored in the .GlobalEnv
(if anyone is changed)
and will be recovered if the latter is stored and loaded again.
Werner A. Stahel
stamp
; R's own predefined options()
.
## see example(stamp) ploptions("stamp") ploptions(c("jitterFactor", "gridlines")) ## set options ploptions(stamp=FALSE, pch=0, col=c.colors[-1], anything="do what you want") ploptions(c("stamp", "anything")) ploptions(default=TRUE) t.plopt <- ploptions(smooth.col="green", assign=FALSE) t.plopt$smooth.col ploptions("smooth.col") ## unchanged