vector containing the intercept
a and slope
b of the
line y=
a +
b *x.
a,b
intercept and slope as above.
reg
a regression object, such as returned by
lsfit.
Specifically,
reg$coef, if it is of length 2,
will be used to define the intercept and slope of the line.
If
reg$coef is of length 1, it is treated as
the slope of a fit through the origin.
h
vector of y-coordinates for horizontal lines across plot.
v
vector of x-coordinates for vertical lines across plot.
...
graphical parameters may be specified to control the line(s).
The trellis parameter
add.line provides default values of the line width (
lwd ),
line type (
lty ), and color (
col ) parameters.
SIDE EFFECTS:
The effect of
panel.abline is that the line y=
a +
b *x
or the specified horizontal and vertical lines are drawn across the
current plot.
SEE ALSO:
The function
is similar to
but it does not issue a warning message if the line does not intersect the plot and it uses the Trellis rendering parameters.
EXAMPLES:
# line with 0 intercept and slope 1
panel.abline(0,1)
# line produced by least-squares fit
panel.abline(lsfit(longley.x[,1],longley.y))
# dotted vertical lines at x==0 and 10
panel.abline(v=c(0,10),lty=2)