Mario Valle wrote:
> Dear all,
> I have a multiline plot with each line labeled with a different letter.
> But I'm not able to make the legend display the same kind of pattern '-a-',
> instead the letter is overwritten by the line. A simpler legend with only
> the letter is not very visible and the pt.bg does nothing with letters.
> Any idea?
>
> plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a')
> legend("left", legend=c("ds1","ds2"), bty='n', col=1:2,
> lty=2,lwd=4,pch=letters)
>
Hi Mario,
This is probably too late and superfluous, but your question made me wonder if the legendg function would to this:

legendg(0.2,0.25,c("letter","number"),
 pch=list(c("-","A","-"),c("-","1","-")),
 col=list(rep(2,3),rep(3,3)))

It does.

Jim

______________________________________________
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