Plot 2 variables, showing a third one with line symbols. Most suitable for showing residuals of a model as this third variable.
plres2x(formula = NULL, reg = NULL, data = NULL, restrict = NULL,
size = 1, xlab = NULL, ylab = NULL, pale = 0.2,
plargs = NULL, ploptions = NULL, assign = TRUE, ...)
none.
a formula of the form ~x+y
, where
x, y
are the 2 variables shown by the coordinates of points,
and residuals are shown by line symbols: their orientation
corresponds to the sign of the residual
, and their length,
to the absolute value.
the result of the model fit, from which the residuals are extracted
the data.frame where the variables are found. Only needed if the variable 'x' or 'y' is not available from the fitting results.
absolute value which truncates the size.
if TRUE
, the inner plotting limits of the residuals is used
if available.
Truncation is shown by stars at the end of the line symbols.
the symbols are scaled so that size*par("cin")[1]
is the length of the largest symbol, as a percentage of the length
of the horizontal axis.
labels for horizontal and vertical axes. Default to the variable names (or labels)
.
scalar between 0 and 1: The points are shown in a more
pale color than the segments as determined by
colorpale
with argument pale=pale
.
result of calling pl.control
.
If NULL
, pl.control
will be called to generate it.
If not null, arguments given in ...
will be ignored.
list of pl options.
logical: Should the plargs be stored
in the pl.envir
environment?
further arguments, passed to plotregr.control
Werner A. Stahel and Andreas Ruckstuhl
data(d.blast)
t.r <- lm(log10(tremor)~location+log10(distance)+log10(charge),
data=d.blast)
plres2x(~distance+charge, t.r)
Run the code above in your browser using DataLab