library(plotly)
data("mtcars")
plot_ly(mtcars, x=~wt, y=mpg, mode="markers", color = ~wt)
plot_ly(x=mtcars$mpg, y=mtcars$gear, type="bar")