[R] simplest possible xyz plot

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Dec 30 08:30:03 CET 2004

t takahashi wrote:
> New to R, and didn't find the following in the docs.
> Main use for R. to get feet wet, is to pipe in x,y,z data, one point
> per line, and
> plot it in 3d, like this:
> {
> echo 1,2,3
> echo 2,4,6
> ...
> } | R ...
> But functions like contour 

contour() needs a (equally spaced) matrix to plot contour lines.
For plotting a point cloud see, e.g., packages lattice (function 
cloud()), rgl, and scatterplot3d.

 > seem to require index vectors that are
> sorted.  I am curious why, and how to convert.

Because it makes no sense to reorder rows and columns of the matrix z.

Uwe Ligges

> Also, I am curious whether any Lisp person has ever written a front
> end to R that translates Lisp syntax to R.  e.g. (countour x y f) ->
> contour(x,y,f).
> Thanks.
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

More information about the R-help mailing list