[R] Different type of legend?
Kevin Burton
rkevinburton at charter.net
Tue Jan 31 20:03:51 CET 2012
I found the problem. Operator error :(
Thank you.
-----Original Message-----
From: Kevin Burton [mailto:rkevinburton at charter.net]
Sent: Tuesday, January 31, 2012 11:53 AM
To: 'Jim Lemon'
Cc: 'r-help at r-project.org'
Subject: RE: [R] Different type of legend?
Sorry this is the commands I am using:
colors <- grey(0:10/10)");
leg.txt <- c("-1", "0", "1")
mo <- map('county', projection='polyconic')");
color.legend(mo$range[1]-1,mo$range[2]+1,mo$range[3]-3,mo$range[3]-1," +
"leg.txt[c(1,length(leg.txt)/2,length(leg.txt))],colors[-1],align='rb',col=c
olors[-1][c(1,length(colors[-1])/2,length(colors[-1]))])");
-----Original Message-----
From: Jim Lemon [mailto:jim at bitwrit.com.au]
Sent: Tuesday, January 31, 2012 3:37 AM
To: rkevinburton at charter.net
Cc: r-help at r-project.org
Subject: Re: [R] Different type of legend?
On 01/31/2012 08:54 AM, rkevinburton at charter.net wrote:
> Sorry. I am not sure how to post a link. Basically the legend looks like:
>
> * * * * * * * * * * *
> -4 -3 -2 -1 0 1 2 3 4
>
> Where ' * ' are colored boxes that are right next to each other. Kind
> of like a gradient.
>
Hi Kevin,
The color.legend function (plotrix) might do what you want.
Jim
More information about the R-help
mailing list