2013/5/16 Alemu Tadesse <alemu.tade...@gmail.com> > I am plotting a krigged values of irrdiance with the following command. > > spplot(p1, zcol="insol.pred", col.regions=terrain.colors(30), cuts=30, > sp.layout=list(pts1), contour=TRUE, labels=TRUE, pretty=TRUE, col='brown', > main=title1) > > I want to overlay California (for that matter any future state for which I > do similar work) on the plot > > How am I going to do that. Where am I going to get the map information and > which command is used. I was trying gadm and there was no success for me. I > think I am missing something very basic. >
just define something like that CAL.POL <- list("sp.polygons", california, lwd=1.5) where california is a shape file you want to read into R with california <- readShapePoly('path_to_your_shape_file') then, according to your spplot, add "CAL.POL" to your sp.layout list spplot(p1, zcol="insol.pred", col.regions=terrain.colors(30), cuts=30, sp.layout=list(pts1, CAL.POL), contour=TRUE, labels=TRUE, pretty=TRUE, col='brown', main=title1) Of course I've used upper case just for highlights purpose hope this helps /r [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo