[R-sig-Geo] How to draw grid contours within a map

Thiago Veloso thi_veloso at yahoo.com.br
Tue Feb 15 13:22:18 CET 2011


  Dear R-Siggers,

  In order to illustrate the spatial domain of the General Circulation Model (GCM) output data I am using, I need to display some grids within a map. They need to be 2.5°x2.5° lat-lon over specific coordinates. Actually, I am trying to partially reproduce Figure 1 inside Challinor et al., 2005 (image attached).

  To load and display the shapefile I use the following code:

library(maptools)
southern=readShapePoly("D:/Maps/papers-in-progress/regiao_sul.shp")
plot(southern)

  Following, I create the "empty" grids to draw:

library(raster)
rprecip<-raster(xmn=-60,xmx=-50,ymn=-35,ymx=-25)
res(rprecip)<-2.5

  But I am stuck on the task of displaying those grids on the map.

  Could anybody please point any directions?

  Best,

  Thiago.


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Challinor et al., 2005.gif
Type: image/gif
Size: 20495 bytes
Desc: Challinor et al., 2005.gif
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110215/0ac51361/attachment.gif>


More information about the R-sig-Geo mailing list