[R] Surface Graphic

Roger Peng rpeng at stat.ucla.edu
Thu May 2 23:48:37 CEST 2002


persp() takes a matrix and plots it as a surface.

I'm not entirely sure of what you're saying, but if you just want to plot
the points, you might consider using the scatterplot3d package on CRAN.  
If you want a surface, then you might want to smooth the points -- for
instance, you could use sm.regression() from the sm package.

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Thu, 2 May 2002, Marcos Sanches wrote:

> 
> Hello list!
> 
> I have a problem with the function 'persp'. I have a data set with the
> variables
> X -> The X coordenate of the insect
> Y -> The Y coordenate of the insect
> deep-> how deep the insect buried into the soil.
> 
> I would like to have a plot with a surface simulating the way the insect
> buried. Is it possible? If I type
> 
> persp(x,y,deep)
> 
> R gives me this error message
> 
> Error in persp.default(X, Y, deep) :
>         increasing x and y values expected
> 
> How do I overcome this?
> 
> Thanks,
> 
> Marcos
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list