plot_ly(mtcars, x = ~hp, y = ~mpg, color = ~as.factor(cyl), size = ~wt, mode = "markers", type = "scatter")