Skip to content

Instantly share code, notes, and snippets.

@RamiKrispin
Created May 8, 2020 13:36
Show Gist options
  • Save RamiKrispin/d94c44c417ae4c05ee257f887dc9dd99 to your computer and use it in GitHub Desktop.
Save RamiKrispin/d94c44c417ae4c05ee257f887dc9dd99 to your computer and use it in GitHub Desktop.
library(plotly)
data(mtcars)
plot_ly(data = mtcars, x = ~ hp, y = ~ mpg)
plot_ly(x = ~ mtcars[,"hp"], y = mtcars[, "mpg"])
var1 <- "hp"
var2 <- "mpg"
plot_ly(x = mtcars[,var1], y = mtcars[, var2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment