Skip to content
Prev 198815 / 398506 Next

Lattice: Saving Plots with Legend

Koffler Daniel wrote:
Really? Did this work for you?
You're mixing lattice and traditional graphics functions.
For lattice, you need the key= argument (or auto.key).
Here's a start:

parallel(~iris[1:4], iris,
   key =
     list(
      corner=c(1, 1),
      lines = list(lty = c(1, 2),
                   lwd = c(1, 3),
                   col = c("black", "red")),
      text = list(c("here", "there"))
     )
)

  -Peter Ehlers