Something like this?

plot(0,0)
legend.text<-c("VAR 1","Higher","Average","Lower","VAR
2","Higher","Average","Lower")
legend.pch=1:8
legend.col=c(0,1,1,1,0,1,1,1)
legend("bottomright",legend=legend.text,pch=legend.pch,col=legend.col,ncol=2)

-tgs

On Mon, May 3, 2010 at 3:10 PM, Nish <nisha.mukte...@gmail.com> wrote:

>
> 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@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.
>

        [[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.

Reply via email to