Dear All, The function curve() draws the graph of functions from R to R. Is there some homologous function to curve() to draw functions from R^2 to R? Thanks in advance, Paul
On 9/23/2008 12:54 PM, Paul Smith wrote:> Dear All, > > The function curve() draws the graph of functions from R to R. Is > there some homologous function to curve() to draw functions from R^2 > to R?No, you would have to write it yourself. The basic idea is to use outer() to construct a matrix of function evaluations, then plot the matrix using persp, contour, image, rgl::persp3d, etc. There are examples on the ?contour man page. Duncan Murdoch
On Tue, Sep 23, 2008 at 6:32 PM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:>> The function curve() draws the graph of functions from R to R. Is >> there some homologous function to curve() to draw functions from R^2 >> to R? > > No, you would have to write it yourself. The basic idea is to use outer() > to construct a matrix of function evaluations, then plot the matrix using > persp, contour, image, rgl::persp3d, etc. There are examples on the > ?contour man page.Thanks, Duncan. perps does what I was looking for. Paul
Paul Smith <phhs80 <at> gmail.com> writes:> > > The function curve() draws the graph of functions from R to R. Is > there some homologous function to curve() to draw functions from R^2 > to R? > >There is a curve3d function in the emdbook package on CRAN.
Paul you might find the view() function in the 'elliptic' package useful. This function implements various methods to visualize functions over the complex plane. HTH rksh Paul Smith wrote:> Dear All, > > The function curve() draws the graph of functions from R to R. Is > there some homologous function to curve() to draw functions from R^2 > to R? > > Thanks in advance, > > Paul > > ______________________________________________ > R-help at 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. >-- Robin K. S. Hankin Senior Research Associate Cambridge Centre for Climate Change Mitigation Research (4CMR) Department of Land Economy University of Cambridge rksh1 at cam.ac.uk 01223-764877