Skip to content
Prev 285479 / 398502 Next

assign same legend colors than in the grouped data plot

This is certainly not a reproducible example, but this works fine for me.

lets = factor(sample(letters[1:3], 10, TRUE))
plot(1:10, 1:10, col = lets)
legend("topleft", legend = levels(lets), col = seq.int(length(lets)), lty = 1)

Michael
On Wed, Feb 15, 2012 at 9:35 AM, agent dunham <crosspide at hotmail.com> wrote: