[R] contour and filled contour plots

Andrea Storto andrea.storto at met.no
Thu Jul 12 19:15:19 CEST 2007


Hello,

I'm trying to overlap a contour and a filled.contour:
as I read in a previous post this can be done
calling contour() in the plot.axes of filled.contour.

When I do it (see example below) the contour is placed
instead of the color bar, while the filled.contour
is not drawn at all, which is the right way?

Thanks

Andrea



postscript("covtd.xy.eps", width=6.5, height=5.5,
             horizontal=FALSE, onefile=FALSE, paper = "special") 
filled.contour(plot.axes={ contour(seq(1,nlev),seq(1,nlev),real2) },
seq(1,nlev),seq(1,nlev),real2,levels=c(-40,-20,-15,-10,-7.5,-5,-2.5,-1.5,-0.5,0.5,1.5,2.5,5,7.5,10,15,20,40),xlab="Model 
levels",ylab="Model levels",
color = colorRampPalette(c("blue", "white", 
"red")),main=expression(paste("Unit: ",10^-6," ",K%.%s^-1)))
dev.off()



More information about the R-help mailing list