[R] Help needed with legend

John Kane jrkrideau at yahoo.ca
Tue May 4 00:58:34 CEST 2010


A small executable example would help here.  We don't even know how you are graphing this. There are several packages including lattice and ggplot as well as the base graphs.

If you are doing this in base graphics have a look at ?text 

--- On Mon, 5/3/10, Nish <nisha.muktewar at gmail.com> wrote:

> From: Nish <nisha.muktewar at gmail.com>
> Subject: [R] Help needed with legend
> To: r-help at r-project.org
> Received: Monday, May 3, 2010, 3:10 PM
> 
> Hello,
> 
> I am new to R and need some help with the legend. How can I
> add a legend for
> two variables (in two columns) each having multiple values
> to be explained
> in the legend. For example:
> 
> Var 1             
>              Var 2
> <symbol> - Higher     
>    <symbol> - Higher
> <symbol> - Avg         
>   <symbol> - Avg
> <symbol> - Lower     
>    <symbol> - Lower
> 
> I know we can use the "ncol" option but not sure how to put
> in the values of
> the variable. Can we use the legend function of this? If
> yes, how?
> 
> Thank you.
> 
> 
> -- 
> View this message in context: http://r.789695.n4.nabble.com/Help-needed-with-legend-tp2124457p2124457.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.
> 





More information about the R-help mailing list