On 09/01/2010 5:22 AM, 军 吕 wrote:
Hi,
Is there any function in R like ezplot in matlab?
How to draw the relationship between x y like this
x^y+y^(sinx)=log(x+y)
It's not pre-packaged, but drawing a contour plot of the function
f <- function(x,y) x^y+y^sin(x) - log(x+y)
should do it:
xvals <- yvals <- seq(0, 30, len=1000)
zvals <- outer(xvals, yvals, f)
contour(xvals, yvals, zvals, levels=0)
Duncan Murdoch
______________________________________________
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.