you didn't show us the code you used to generate the legend. I'm guessing you want to add to the legend list something like "lty=0:7" .
KB wrote > I recently started using R, so I'm not really experienced with it. My > question is on adjusting xyplots to get lty lines instead of coloured > lines. > > My datasets looks about this: > year area species x > 1998 1 x1 0.005 > 1998 2 x2 0.006 > etc. > > year is factor from 1967 to 2013 > area is factor from 1 to 10 > species if factor, with 7 species > > the following code works: > xyplot(x~Year|Area, data=prob2, groups=Species, type="l", auto.key=TRUE) > > but then I have all coloured lines. > > when I insert lty=0:7, col="black", it works, however my legend stays with > different colours > > What do I have to insert in my code to get black lty lines also in the > legend? > > Thanks in advance! -- View this message in context: http://r.789695.n4.nabble.com/Question-on-xyplot-tp4680833p4680888.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.