Displaying 1 result from an estimated 1 matches for "lsegement".
Did you mean:
segement
2007 Sep 07
1
contourplot lines, text, and mtext
If I have a contourplot (in the lattice package) and I want to add
straight lines to it, how do I do this?
I see that there are llines() and lsegement() functions for lattice
plots, but they don't seem to do anything in this case:
library(lattice)
library(KernSmooth)
x=rnorm(10000)
y=x+rnorm(x,0,.5)
a=bkde2D(cbind(x,y),.7)
z=as.vector(a$fhat)
grid=expand.grid(x=a$x1,y=a$x2)
grid$z=z
contourplot(z~x*y,data=grid,region=T,col.regions=gray(seq(...