[R] Bug in lattice auto.key argument

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Mar 17 14:31:07 CET 2011


On Wed, Mar 16, 2011 at 12:52 AM,  <JLucke at ria.buffalo.edu> wrote:
> 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).

I think Felix has fixed this bug a couple of days ago. Please check
the r-forge version from

https://r-forge.r-project.org/R/?group_id=638

There should be a new release sometime next week.

-Deepayan

>
> 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 at 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.
>



More information about the R-help mailing list