p <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, color=~iris$Species, mode='markers', type = "scatter")

p
p <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, z = ~Petal.Width,
type = "scatter3d", color=~iris$Species, mode='markers')
p