Using the most recent R API (2.0.16), points get ommitted from 3D scatter plots if they’re the only member of a color group. For example, there are no zebras in the plot produced with the following code:
three_dee_data <- data.frame(
x = 1:10,
y = sample(1:10, 10),
z = sample(1:10, 10),
color = factor(c('mouse','mouse','mouse','dog','dog','dog','cat', 'cat', 'cat', 'zebra'))
)
plot_ly(
three_dee_data,
x = x,
y = y,
z = z,
type = "scatter3d",
mode = "markers",
color = color
)
… but it works fine as long as there’s more than one zebra:
three_dee_data <- data.frame(
x = 1:10,
y = sample(1:10, 10),
z = sample(1:10, 10),
color = factor(c('mouse','mouse','mouse','dog','dog','dog','cat', 'cat', 'zebra', 'zebra'))
)
Is there a work-around?
Thanks,
Jon