On 03.02.2010 18:38, mb622 wrote:>
> hi,
>
> I am new to R and i have managed to create 2 3d scatterplots with R and
> Iwaswondering if there is a way to connect them.
In most cases it is advisable to just add points as shown in the
examples of ?scatterplot3d
> I was also wondering how i can add arrows to the plot similar to the 2d
> comment arrows()?
Example:
## plot 10 points:
s3d <- scatterplot3d(1:10, 1:10, 1:10)
## plot arrows from (2,2,2) to (5,5,5)
## calculate arrow projections into 2D space:
from <- s3d$xyz.convert(2,2,2)
to <- s3d$xyz.convert(5,5,5)
## and plot:
arrows(from$x, from$y, to$x, to$y)
Uwe Ligges