[R] Lattice --reference line in panels does not come up

Luis Ridao Cruz Luisr at frs.fo
Wed Feb 16 13:26:11 CET 2005


R-help,

I am quite new to lattice.
I am plotting something in which I want some reference lines.
I do the foolowing :

library ( lattice )
reference.line <- trellis.par.get ( "reference.line" ) 
reference.line$lty <- 2    ## not working with any of the
reference.line components
# reference.line$col <- "red" 
trellis.par.set("reference.line", reference.line)
xyplot ( number ~ cm | year , data = lgda., type = "l", col = "black" ,
ylab = "Number", xlab = "Length (cm) ") ## the actual plot

The result is without reference lines.

What am I doing wrong?


Thanks in advance




More information about the R-help mailing list