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) Thanks
Duncan Murdoch
2010-Jan-09 11:04 UTC
[R] Is there any function in R like ezplot in matlab?
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