[R] scatterplot3d(); customise axes

Tonja Krueger tonja.krueger at web.de
Fri Apr 13 09:52:07 CEST 2012


   Hi all!
   I’m using scatterplot3d() to show the distribution of data for different
   locations. As I wound like to show distances between the locations and also
   label the locations, I was wondering whether there is a function similar to
   axis() for a 2D plot that works with scatterplot3d()?
   2D:
   a <- runif(50)
   a2 <- qnorm(a)
   b <- runif(50)
   b2 <- qnorm(b)
   c <- runif(50)
   c2 <- qnorm(c)
   data <-
   rbind(cbind(rep(1,50),a,a2),cbind(rep(7,50),b,b2),cbind(rep(10,50),c,c2))
   plot(data[,1],data[,2],xaxt="n",xlab="Location",ylab="var 1")
   axis(1, at= c(1,7,10),labels = c("Loc 1","Loc 2", "Loc 3"))
   3D:
   library(scatterplot3d)
   scatterplot3d(data[,1], data[,2], data[,3],box=T, col.axis="black", angle=
   45,grid=T, xlab="Location",zlab="var 2",ylab="var 1")
   Thank you for your suggestions,
   Tonja


   Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone
   und Android.
   [1]https://produkte.web.de/freemail_mobile_startseite/

References

   1. https://produkte.web.de/freemail_mobile_startseite/


More information about the R-help mailing list