[R] how to plot implicit functions

Duncan Murdoch murdoch at stats.uwo.ca
Mon Dec 29 20:28:13 CET 2008


YIHSU CHEN wrote:
> Dear R users --
>
> I think this question was asked before but there was no reply to it.
> I would appreciate any suggestion any of you might have.  I am
> interested in plotting several "implicit functions" (F(x,y,z)=0) on
> the same fig.     Is there anyone who has an example code of how to do
> this?
The misc3d package has a contour3d function that could draw a contour of 
the function F at level 0.  Assuming you have written a function to 
calculate F and know the region where you want to plot it, you could 
just say

contour3d(F, 0, seq(minx, maxx, 30), seq(miny, maxy, 30), seq(minz, 
maxz, 30)) 

Duncan Murdoch



More information about the R-help mailing list