[R-sig-Geo] adding a bravais pearson test to spplot

fathalli bilel bilelfathalli at yahoo.fr
Thu Apr 16 17:02:58 CEST 2015


Dear all,
My name is Bilel and I'am a PhD student from Tunisia working on climate modelling. My issue today is how to add a Bravais Pearson test as a contour plot to an existing spplot map. Precisely, I have plotted a SpatialPixelsDataFrame of Pearson correlation coefficients between simulated and observed precipitation over the Mediterranean basin using spplot and now I need to add a contour line of the statically significant correlation coefficient at 95% CI.I have been vainly trying for several days to solve this issue, so I really need your help please. 
Best regards Bilel
Here the code I'am using for plotting correlations between seasonal observed and simulated precipitation (cor_djf, cor_mam, cor_jja, cor_son : matrices)
cors <- data.frame(long=mylong,lat=mylat a =as.vector(cor_djf), b=as.vector(cor_mam), c=as.vector(cor_jja), d=as.vector(cor_son2)) coordinates(cors)<-~long+latcors2<-SpatialPixelsDataFrame(cors, tolerance=5.65099e-05, cors at data,                                 proj4string=CRS("+init=epsg:27572"))
spplot(cors2,  col.regions =col.regions ,at=seq(-1, 1, length.out=(length(coll))+1),       par.strip.text=list(fontface='bold'),       xlab = list("Longitude", cex=1.2), ylab = list("Latitude",cex=1.2),       main = "",       aspect = "iso",       colorkey = list(labels=list(cex=0.9),space='bottom',height=1,width=2),       names.attr =c( "DJF","MAM","JJA","SON"),       sp.layout=list(lstc),scales=list(draw=TRUE, cex=1.1),       as.table=TRUE,       margin=FALSE)



	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list