[R] 3d plots?

Jason Turner
Mon, 12 Feb 2001 12:50:31 -0000

Hi all

I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at
http://www.r-project.org/screenshots/volcano-persp.jpg

In my case, I'm trying to show a density estimate of
two-variable system, using the GenKern package.  I've
used the image() and contour() to create a nice shaded plot,
but I've found a 3d plot is often easier for the audience
to absorb.

The session is simple enough; dfw is a data.frame of
two variables, pressure and flow.

> library(GenKern)
> attach(dfw)
> ks<- KernSur(pressure,flow)
#now, make the shaded contour plot.
> image(ks$xvals,ks$yvals,ks$zden,col=terrain.colors(100), axes=TRUE)
> contour(ks$xvals,ks$yvals,ks$zden,add=TRUE)

Any ideas from here?

Cheers

Jason
--
Indigo Industrial Controls Ltd.
64-21-343-545
jasont at indigoindustrial.co.nz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._