Hi, 

If you run the demo for persp (I have R 1.7), you will see that there is a
good example of 'coluring' a volcano according to different heights, just try

> demo(persp)

and check out the code. You probably will find it too complicated as I did,
I was trying to do the same and honestly I wasn't able to. However, there
is a way around and it is to use the function wireframe from the lattice
package

> library(lattice)
> ?wireframe

If you run through the help examples you'll see that it is a lot easier to
colour the surfaces the way you want using this function. However,
wireframe is extreMELY slow, so, if you have a big matrix it might be a
pain in the behind. Also, the way you feed the data to wireframe is
different to the way you do it with the persp function. I hope this is of
any help.

M.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to