The Lattice auto.key argument has a bug in R.12.2.

R version 2.12.2 (2011-02-25)
Platform: i386-pc-mingw32/i386 (32-bit)
....
other attached packages:
[1] lattice_0.19-17

loaded via a namespace (and not attached):
[1] grid_2.12.2

If I set up my plot parameters as

require(lattice)
superpose.line.settings <- trellis.par.get("superpose.line")
str(superpose.line.settings) 
superpose.line.settings$col <- 1
superpose.line.settings$lty <- c(1,2,5)     *****
superpose.line.settings$lwd <- 2
trellis.par.set("superpose.line",superpose.line.settings)

and then set up my key list as

my.key <- list(space="top", points=FALSE, lines=TRUE, columns=3)

and then run xyplot with the argument auto.key=my.key, 
I do NOT get the proper legend at the top of the plot.
Instead of the lines in the legend having the characteristics of 
lty=c(1,2,5), they have the characteristics of lwd=c(1,2,5).

The auto.key argument works fine in R.12.1

R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)
.....
other attached packages:
[1] lattice_0.19-13

loaded via a namespace (and not attached):
[1] grid_2.12.1

 
Joe
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to