Zhongkui.Luo at csiro.au
2009-Sep-19 06:12 UTC
[R] Filled contour in a irregular map (shapefile)
Hello All,
I want to draw a figure with filled contour in a irregular map.
But I found that the contours overlap the boundaries of the map, and also some
regions in the map were not filled.
I have following data:
data1. A shapefile (i.e., a map with boundary, for example, the whole Australia
map);
data2. A text file with three columns: x, latitude; y,longitude;z,variable
(e.g., rainfall);
and use following R code:
Map<-readShapeSpatial("data1")
plot(Map)
data2.li<-interp(data2$x,data2$y,data2$z)
filled.contour(data2.li, color=topo.colors, add=TRUE)
How can I limits the filled contours just inside the map?
Thank very much for that!
Zachary
[[alternative HTML version deleted]]