How to change scale labeling in spplot
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 at 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 at 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 at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Thomas E Adams, III 1724 Sage Lane Blacksburg, VA 24060 tea3rd at gmail.com (personal) tea at terrapredictions.org (work) 1 (513) 739-9512 (cell) [[alternative HTML version deleted]]