Luis Miguel Almeida da Silva wrote:>
> Hello!
>
> I have a 38x3 matrix and I would like to make a 3d plot.
> However the first 27 rows are from one class and the others are
> from other class. My target is to plot the two classes with
> different colors in the same 3d plot. Is it possible? I have
> already package scatterplot3d.
Yes, just specify a vector containing the colours (either by names or
numbers). Example:
X <- matrix(rnorm(3*38), ncol = 3)
scatterplot3d(X, type = "h",
color = rep(c("black", "red"), c(27, 11)))
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._