Re: [R] colored 3d scatter plot

From: Jim Lemon <>
Date: Wed, 05 Mar 2008 13:54:35 +1100

SNN wrote:
> I tried
> scatterplot3d(data, color = rep(c("red", "blue"), c(100, 15)), pch=16) and I
> am getting the following error message,
> Error in plot.xy(xy.coords(x, y), type = type, ...) :
> invalid color name
> Does anyone know what he problem is?
Hi Nancy,
When you "rep" your colors, the second argument should be a number equal
to the number of values. That is, if "data" contains 100 x, y and z components, try:


My guess is that you are generating NAs or something with your version.

Jim mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 05 Mar 2008 - 02:50:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 04:30:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive