The label colors on my plotly 3d scatter charts do not match the marker colors:
All labels end up being the same color with the following minimal example:
plot_ly(
data = mtcars,
type = "scatter3d",
mode = "markers",
colors = c("blue","red"),
text = row.names(mtcars),
hoverinfo = "text",
color = ~cyl,
x = ~disp,
y = ~hp,
z = ~qsec
)
With 2D scatter plots, the labels are colored appropriately:
Which is achieved using:
plot_ly(
data = mtcars,
type = "scatter",
mode = "markers",
colors = c("blue","red"),
text = row.names(mtcars),
hoverinfo = "text",
color = ~cyl,
x = ~disp,
y = ~hp
)
I know a color range for the legend isn't appropriate in this example, but it's needed for the actual data I would use with this code.