I am using rgl to create a scatterplot of points from an imported .csv dataset. The colors that I'd like the points to be is set in the dataset. Everything works fine, except that when the scatterplot is displayed the colors of the points do not match the colors defined in the data. E.g., all the points that are designated as "blue" might actually be green, and all the points designated as "yellow" might actually show up red.
data=read.csv("ExpLayout.csv", header = TRUE)
x=data$x
y=data$y
z=data$z
color=data$color
plot3d(x=x, y=y, z=z, type="s", col=color)
read.csv(filename, header=TRUE, stringsAsFactors=FALSE), then report back. - Mariusdput( head( data ) )- Simon O'Hanlon"red", but that doesn't mean thatcoloris actually acharactervector and not afactor. - Marius