[R-sig-Geo] Data on irregular grid in a stereographic projection

Uhlig, Marianne (IMK) marianne.uhlig at kit.edu
Thu Feb 21 14:08:16 CET 2013


Hi everyone,

Maybe this sounds dumb, but I am new to R. I'm trying to plot data on a 
stereographic map that looks like
map("world",proj="stereographic",xlim=c(-50,75),ylim=c(20,75))
map.grid(lim=c(-50,75,20,75,180,50,90),nx=5,ny=8,pretty=TRUE,col=1)

My Problem is, that I can't use image(lat,lon,data), because I have an 
irregular grid like this:
dim(lat)=212  206
dim(lon)=212  206
dim(data)=212  206
(Error in image.default(lon, lat, data) :
   increasing 'x' and 'y' values expected)

So far I'm using image.plot

image.plot(lon,lat,data,xlim=c(-50,75),ylim=c(20,75),...)
addland(col="white",lwd=1)
grid()

which works fine, except the resulting image doesn't look very good.

Is there an relative easy way of plotting this without interpolating my 
data onto a regular grid?

Many thanks.

Marianne



More information about the R-sig-Geo mailing list