[R] spplot

Debasish Pai Mazumder pai1981 at gmail.com
Thu Dec 10 21:10:24 CET 2015


Hi all,

I am using spplot for a spatial map.

spplot(hspdf, "CDP", col = "white", col.regions = blue2red(20), sp.layout =
list(l2), at = seq(1,10,1), colorkey = list(space = "bottom", labels =
list(labels = paste(seq(1,10,1)), cex = 1.5)), sub = list("CDP", cex = 1.5,
font = 2))

I have three questions related to spplot

[1] How to control the limit of xlim and ylim

     I defined the latitude and longitude limit in l2 but it did not work

[2] How to control color scale

      if change the "at = seq(1,10,1)" and "labels = paste(seq(1,10,1))" to
0-10, I only get color 0-5 in plot
     don't know why?

[3] Panel plot

     I would like to panel spplot with hist. How do I do that?

    spplot(hspdf, "CDP", col = "white", col.regions = blue2red(20),
sp.layout = list(l2), at = seq(1,10,1), colorkey = list(space = "bottom",
    labels = list(labels = paste(seq(1,10,1)), cex = 1.5)), sub =
list("CDP", cex = 1.5, font = 2))

       hist(cdp.obsc, col="grey", border="grey", main="CDP", probability=T)

with regards
-Pai

	[[alternative HTML version deleted]]



More information about the R-help mailing list