[adegenet-forum] interpolation in a map
Zhongkui.Luo at csiro.au
Zhongkui.Luo at csiro.au
Sun Sep 20 04:07:56 CEST 2009
Hi,
Sorry for the bother. A R problem looks for your suggestion.
I want to draw a figure with filled contour in an 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 used the following R code:
Map<-readShapeSpatial("data1") # data1, a shapefile, the whole Australian map with boundary.
plot(Map)
data2.li<-interp(data2$x,data2$y,data2$z) #data2, txt file with three columns: x, longitude; y, latitude; z, variable (e.g., rainfall)
filled.contour(data2.li, color=topo.colors, add=TRUE)
Are there any R functions can be used to limit the filled contours just inside the map (no overlap and no blank)?
Do you have any ideas to deal with this problem? Thanks very much for that!
Best,
Zhongkui Luo
PhD candidate
CSIRO Land & Water, Butler Lab.
Clunies Ross Street, Acton
Canberra, ACT 2601, Australia
Ph: +61 2 6246 5594 E_Mail: Zhongkui.luo at csiro.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20090920/82cc88df/attachment.htm
More information about the adegenet-forum
mailing list