[R] overlaying a contour line in a levelplot

Jorge Ahumada jahumada at usgs.gov
Wed Apr 20 16:16:04 CEST 2005

Hello there,

I am creating a series of images using levelplot but I also want to  
overlay a contour for a particular value as reference. Here is the  
levelplot command for the image:


and then to add the contour plot (I only want a contour at level 5):


this shifts the contourline to the right of the levelplot. If I use  
region=T then it looks better but it is still shifted slighlthy, plus  
have an extrakey overlayed to the original key with different numbers  
on it.

If I draw the first plot, but only put one contourline on it, I loose  
all the other colors...Any ideas?



More information about the R-help mailing list