plot_ly(mtcars, x = ~mpg, y = ~hp, type = "scatter", color = ~factor(cyl))
## No scatter mode specifed:
##   Setting the mode to markers
##   Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode