A predefined panel function that can be used to add a spline smooth based on the provided data.
panel.spline(x, y, npoints = 101, lwd = plot.line$lwd, lty = plot.line$lty, col, col.line = plot.line$col, type, horizontal = FALSE, …, keep.data = FALSE, identifier = "spline")
Variables defining the data to be used.
The number of equally spaced points within the range of the predictor at which the fitted model is evaluated for plotting.
Graphical parameters for the added
Ignored. The argument is present only to make sure that
an explicitly specified
type argument (perhaps meant for
another function) does not affect the display.
A logical flag controlling which variable is to be treated as the
predictor (by default
x) and which as the response (by
TRUE, the plot is ‘transposed’
in the sense that
y becomes the predictor and
response. (The name ‘horizontal’ may seem an odd choice for
this argument, and originates from similar usage in
Passed on to
default here (
FALSE) is different, and results in the
original data not being retained in the fitted spline model. It may
be useful to set this to
TRUE if the return value of
panel.spline, which is the fitted model as returned by
smooth.spline, is to be used for subsequent
A character string that is prepended to the names of grobs that are created by this panel function.
The fitted model as returned by