I have more than three lines in one and I want to add a legend for each line abline( m1, col = 'red' ) ablime( m2, col = 'blue' ) abline( m3, col = 'purple' ) How can I add a legend? . Is it also possible to increase the thickness of the lines? Thanks [[alternative HTML version deleted]]
On Fri, Oct 2, 2009 at 3:46 PM, Ashta <sewashm at gmail.com> wrote:> I have more than three lines in one ?and I want to add a legend ?for each > line > > abline( m1, col = 'red' ) > ablime( m2, col = 'blue' ) > abline( m3, col = 'purple' ) > > How can I add a legend? .Surprisingly, it is the legend() function. See ?legend.> Is it also possible to increase the thickness of > the lines?It is, see the 'lwd' parameter in ?par. Best, Gabor> Thanks > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Gabor Csardi <Gabor.Csardi at unil.ch> UNIL DGM
On Oct 2, 2009, at 9:46 AM, Ashta wrote:> I have more than three lines in one and I want to add a legend for > each > line > > abline( m1, col = 'red' ) > ablime( m2, col = 'blue' ) > abline( m3, col = 'purple' ) > > How can I add a legend? . Is it also possible to increase the > thickness of > the lines??abline and this time pay closer attention to the lwd parameter. The answer to the legend question may depend on the details of the plot call, but I am unclear why you have not yet tried: ?legend I am getting the impression that you are not taking advantage of R's help system. -- David Winsemius