Dear Ying,

A simple way to obtain what you want is the following:

1) Select an x-y mesh where you want to plot the function, using

xs<-seq(xmin,xmax,length.xs)
ys<-seq(xmin,xmax,length.ys)

2) Define f as a function of (x,y) and compute the values of f over the x-y 
mesh, by using

zs<-outer(xs,ys,FUN=f)

3) Draw a contour plot at level 0:

contours(xs,ys,zs,levels=0,drawpoints=FALSE)

Hope it helped.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to