[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:
print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab=
NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T)
and then to add the contour plot (I only want a contour at level 5):
print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab=
NULL,contour=T,at=c(0,5),reg=F,labels=F),split=c(1,1,1,1))
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?
thanks,
Jorge
More information about the R-help
mailing list