[R] persp graphs
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sun Sep 21 11:13:33 CEST 2003
Mario Alberto Cozzuol wrote:
>
> On Saturday 20 September 2003 12:18, Uwe Ligges wrote:
> > So you are not going to plot a surface, but "just" a set of points? In
> > that case persp() is inadequate. For example you can use cloud() in
> > package lattice, scatterplot3d() in package "scatterplot3d", the
> > packages djmrgl and rgl, or xgobi or ggobi as external software.
>
> Actually I want to plot a surface, a geographic surface just like the volcano
> in the example, this is because does not make sense to order x and y. In my
> case the z values are the pH value for the soil at each poit.
> I am missing something?
My guess was wrong. But your question can be easily be answered by
reading ?persp:
"x, y: locations of grid lines at which the values in `z' are measured."
So you need a vector x of length n, a vector y of length m and a matrix
z of dimension n x m.
You do NOT need a value of x and y for each point, but only for each
grid line. There is not difficulty to order them, when you already got a
matrix for z.
Uwe
> Thanks,
>
> Mario
>
> --
> Dr. Mario A. Cozzuol
> Laboratório de Biologia Evolutiva
> Universidade Federal de Rondônia
> BR 364, Km 9,5
> 78900-000 Porto Velho, RO
> Brasil
> Tel./Fax 55 69 217-8593
> E-mail mario at unir.br
>
More information about the R-help
mailing list