I am looking to take advantage of the awesome features in Plotly but I am having a hard time figuring out how to add a regression plane to a 3d scatter plot. Here is an exa
Replacing the plot part of the code with this, also fixes the error:
attach(my_df)
iris_plot <- plot_ly(my_df,
x = ~Sepal.Length,
y = ~Sepal.Width,
z = ~Petal.Length,
text = Species,
type = "scatter3d",
color = ~Species,
colors = c("red","blue","green"),
mode = "markers")