Skip to content
Prev 168966 / 398506 Next

xyplot with lowess curves

Does this do what you want? The "panel" argument has the custom pane
function I referred to before.

Col <- c("red", "green", "blue", "purple")
xyplot (
 SnowLineElevation ~ Year | Model,
 data = d,
 panel = function(x, y, col, ...) {
   Col <- Col[panel.number()]
   panel.xyplot(x, y, col = "blue", ...)
   panel.loess(x, y, col = Col)
 },
 ylim = c(0,100),
 type = c('p','smooth'),
 col = 'blue',
 pch = 21,
 xlab = 'Year',
 ylab = 'Snowline Elevation [m]'
)

On Mon, Feb 2, 2009 at 12:18 PM, Hutchinson,David [PYR]
<David.Hutchinson at ec.gc.ca> wrote: