[R] some help with this contour plot
antonio rodriguez
arv at ono.com
Fri Nov 22 09:12:11 CET 2002
Hi,
I have imported some netCDF data into R. My data is an array of 4*4*428
(lon,lat, months) dimension.After transforming to a 16*428 matrix dimension
I've performed an svd analysis in order to extract the eigenvectors and
eigenvalues. So
# F is matrix (16,428)
S<-F%*%t(F);
svd.S<-svd(S);
eof1<-svd.S$u[,1];
eof2<-svd.S$u[,2];
eof3<-svd.S$u[,3];
lat range is: 30.5N to 33.5N
lon range is:339.5 to 342.5 degrees east
how do I can plot the eof1 on a contour plot with axis the lat (y-axis) and
lon (x-axis) ranges?
I've made:
x<-(350.5:353.5)
y<-(34.5:37.5)
E1<-array(eof1,c(4,4));
E2<-array(eof2,c(4,4));
E3<-array(eof3,c(4,4));
contour(x,y,E1);
contour(x,y,E2);
contour(x,y,E3);
I get what I think is a nice and right plot, but is this geographically OK?
Thanks in advance
Antonio
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list