[R] add single contour line to levelplot

Ian Jonsen jonsen at mathstat.dal.ca
Tue Aug 31 21:25:38 CEST 2004


Hello,

I want to add a single contour line to a levelplot but can't figure out
how to do it 'on-the-fly'. When I include the last line in the code below,
I get the following error:

Error in NextMethod("[") : Argument "subscripts" is missing, with no default

Any tips on how to fix this are greatly appreciated!

Ian Jonsen


levelplot(dens~nu*sigma,data=tsurflikB,at=c(-20,-10,-5,-4,-3,-2,-1),
 col.regions=gray(seq(0.5,0.9,length=14)),region=T,colorkey=F,aspect=1,
 panel=function(x,y,z,...){
      panel.levelplot(x=x,y=y,z=z,...)
      lpoints(x[z==0],y[z==0],pch=16,cex=0.5)
      panel.levelplot(z~x*y,at=-3,contour=T,aspect=1)
 }
)

_______________________________
Ian Jonsen, Postdoctoral Fellow
Dept Biology, Dalhousie University, Halifax, NS, CAN
Phone: 902 494 3910; Fax: 902 494 3736
jonsen at mathstat.dal.ca




More information about the R-help mailing list