Skip to content

how do I draw this surface -- hand drawn in the attachemtn

3 messages · gallon li, Steve Lianoglou, Kingsford Jones

#
Basially I have the observation for x, y, and z

for each fixed z, the value of y moves from 0 to y0 as x moves from 0 to x0.
I then move the curve for z from 0 to z0 and form a continuous surface. want
to know if there is a way that R can replace my handdrawing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: draw0001.pdf
Type: application/pdf
Size: 292083 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090905/cd009e5f/attachment-0002.pdf>
1 day later
#
Hi,
On Sat, Sep 5, 2009 at 5:16 AM, gallon li<gallon.li at gmail.com> wrote:
Do the examples in ?persp help?

How about this example from the r graph gallery:

http://addictedtor.free.fr/graphiques/graphcode.php?graph=42

I think lattice graphics also has functions to help plotting in 3d,
but I've never used it. I've only seen it in actio in the lattics vs.
ggplot series of posts on the learnr.wordpress.com blog (very
helpful).

-steve
1 day later
#
for example...


x <- y <- seq(.1, 2, .1)
ftn <- function(x, y) x - .25*x^2
z <- outer(x, y, ftn)
persp(x, y, z, theta = 330, phi = 30)



hth,
Kingsford

On Sun, Sep 6, 2009 at 8:28 AM, Steve
Lianoglou<mailinglist.honeypot at gmail.com> wrote: