[R-sig-Geo] How to change scale labeling in spplot
Thomas Adams
te@3rd @end|ng |rom gm@||@com
Mon Aug 10 23:05:35 CEST 2020
Hi Tim,
Yes, basically, I have and just did again, try this -- same result...
Tom
On Mon, Aug 10, 2020 at 4:34 PM Tim Salabim <tim.appelhans using gmail.com> wrote:
> Have you tried
> colorkey=list(labels = list(labels = list("Af","Am","Aw")))
> ?
>
>
>
> On Mon, Aug 10, 2020, 22:01 Thomas Adams <tea3rd using gmail.com> wrote:
>
>> Hi all,
>>
>> I have searched for examples to change the labeling for raster data (two
>> panels) consisting of integer values (1, 2, and 3). In the scale I want to
>> label these as "Af", "Am", Aw".
>>
>> My code looks like:
>>
>> colp <- colorRampPalette(c("#960000", "#FF0000", "#FFCCCC"))
>> brks<-seq(0,3,1)
>>
>> spplot(KG_haiti,xlim=c(-8313027,-7959668),ylim=c(2017552,2297053),at=brks,col.regions=colp(length(brks)-1),ylab="Climate
>> Class",main="Koppen-Geiger Climate Classification for\nClimate Years
>> 1981-2010 and El Nino Years",names.attr=c("Climate Normal","El
>> Nino"),colorkey=list(labels = list(labels = c("Af","Am","Aw"))))
>>
>> I'm getting just the 3 colors, but the labels "Af", "Am", Aw" are repeated
>> across each color; I need to have each color associated with just one of
>> the labels. Obviously, I'm doing something wrong...
>>
>> I just cannot figure out how to do this.
>>
>> Regards,
>> Tom
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
--
Thomas E Adams, III
1724 Sage Lane
Blacksburg, VA 24060
tea3rd using gmail.com (personal)
tea using terrapredictions.org (work)
1 (513) 739-9512 (cell)
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list