Thank you all for your kind reply and help. I changed the legend function as Mr. Peter Ehlers suggested and the plots look good.
Thank you again. Hannah 2010/7/22 Peter Ehlers <ehl...@ucalgary.ca> > On 2010-07-21 22:06, li li wrote: > >> Hi all, >> I am have some difficulty with the legend function. >> I need to add a legend to describe the different line types in a plot. >> The >> legend box is small. >> It did not include sufficient length of each line type to help distinguish >> the differnt line types. >> Is there a way to fix this. >> Thank you >> Hannah >> >> > If I understand correctly, you want to have longer > line segments in your legend. I agree that this is > sometimes desirable but, with the current code, > it's not possible - the segment length is hard-coded. > > If it matters enough to you, you can easily modify the > code to achieve your aim: search for the following two > lines and in each replace the '2' with a greater value, > say '3'. > > First line: > > w0 <- w0 + (2 + x.off) * xchar > > Second line: > > seg.len <- 2 > > I don't think that this will have any undesirable side > effects, but I haven't given it much thought. I haven't > had any problems with this version of legend(). > > -Peter Ehlers > [[alternative HTML version deleted]] ______________________________________________ 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.