[R] Legend

Gábor Csárdi csardi at rmki.kfki.hu
Fri Oct 2 15:51:02 CEST 2009


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




More information about the R-help mailing list