Skip to content
Prev 169798 / 398506 Next

Tables in legend

Thanks Jim. That was the first thing I tried. I should have mentioned
that I was also trying to write the three columns of the legend using
three different colors. So I want the "blah" column to be black, second
column to be red and the third column to be blue.

I would appreciate if you can share any ideas on how to do this.  
	

-----Original Message-----
From: jim holtman [mailto:jholtman at gmail.com] 
Sent: Friday, February 06, 2009 4:52 PM
To: Vemuri, Aparna
Cc: r-help at r-project.org
Subject: Re: [R] Tables in legend

This will probably do what you need:

plot(1)
x <- 1:10  # numbers for the legend
blah <- LETTERS[1:5]
legendData <- character(5)
for (i in 1:5)
    legendData[i] <- sprintf("Blah-%s %d %d", blah[i], x[2*i - 1],
x[2*i])
legend('topright', legend=legendData)
On Fri, Feb 6, 2009 at 6:57 PM, Vemuri, Aparna <avemuri at epri.com> wrote:
legend
number12
compactly
and
http://www.R-project.org/posting-guide.html