[R] 3d plots?

Jason Turner jasont at indigoindustrial.co.nz
Mon Feb 12 13:50:31 CET 2001

Hi all

I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at

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?


Indigo Industrial Controls Ltd.
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

More information about the R-help mailing list