From ligges@statistik.uni-dortmund.de  Fri Mar 15 16:16:47 2002
From: ligges@statistik.uni-dortmund.de (Uwe Ligges)
Date: Fri, 15 Mar 2002 17:16:47 +0100
Subject: [Rd] Re: [R] persp(): add second plane
References: <Pine.LNX.4.30.0203151003270.20916-100000@bolker.zoo.ufl.edu>
Message-ID: <3C921E6F.BB81543B@statistik.uni-dortmund.de>


Ben Bolker wrote:
> 
>   [forwarded to R-devel]
> 
>   I'm most interested in integrating persp() and scatterplot3d() so that
> we can (e.g.) easily draw graphs like response surfaces with associated
> points (yes, there are serious questions about whether 3d perspective
> plots are good general tools for data presentation, but there are some
> places where it's really useful).  I can think of a bunch of quick hacks,
> but I don't really know how an integrated system should be designed for
> consistency and ease of use.


I think it's not possible to write an integrated system that uses the
functions scatterplot3d() and persp() as they are. The straightforward
way, from my point of view, is to write a new function (suggestions for
a name?) along scatterplot3d()'s code, that uses persp() instead of
scatterplot3d()'s own plot function in principle.

I'll volunteer to write such a function during the next months, but
there are still some other points on my todo list (and I myself don't
need such a function at present). 

Uwe


>   Ben
> 
> On Fri, 15 Mar 2002, Uwe Ligges wrote:
> 
> > Henrik Bengtsson wrote:
> > >
> > > Hmm, very interesting. I guess I am not the only one that thought about
> > > extending Ben Bolkers idea to plot R^3 data by starting with an empty
> > > persp(). Except from the "risk" of plotting outside the bounds of 3d-box
> > > created by persp()
> >
> > Have a look into the code of the package "scatterplot3d". That "risk" is
> > already solved in there and the ideas will also work for your example.
> > Also some other generalizations could be adapt for the "persp()-3d"
> > case.
> >
> > > I can't see any problems with this approach. I wrote up
> > > some code for a plot3d() and a points3d() method. I have pasted the code at
> > > the end and as you see I made the plot3d() code to be almost identical to
> > > the one for persp(). First an example how the functions can be used and then
> > > the code:
> >
> > [snip]
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: [R] persp(): add second plane
Uwe Ligges