Re: [R] lines through points in lattice legend

2023-01-29 Thread martin gregory via R-help
Hi Kenneth, replacing the auto.key argument with key = list(space = "right", lines = list(type="b", pch=21:22, fill = c("white", "black")), text = list(c("a","b"))) works, but is definitely not simpler. Given that your choice of points is so

Re: [R] lines through points in lattice legend

2023-01-28 Thread Kenneth Knoblauch
/63/single-member/ De : Deepayan Sarkar Envoyé : samedi 28 janvier 2023 16:46 À : Kenneth Knoblauch Cc : r-help@r-project.org Objet : Re: [R] lines through points in lattice legend   On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch wrote: > > Hi, > > I'm strugg

Re: [R] lines through points in lattice legend

2023-01-28 Thread Deepayan Sarkar
On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch wrote: > > Hi, > > I'm struggling to find if there is a simple way to make the lines and points > overlap in a legend for a lattice plot using auto.key. Here is a toy example > of what doesn't work (for me) as the lines and points are adjacent

[R] lines through points in lattice legend

2023-01-28 Thread Kenneth Knoblauch
Hi, I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key.  Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping: library(lattice) d <- data.frame(x = 1:2,