Leihong
December 15, 2017
In this simple slide we want to show the usage of plotly, with embeded dataset mtcars
### load plotly
library(plotly)f <- list(
family = "Courier New, monospace",
size = 18,
color = "#FF00FF"
)
x <- list(title = "HP", titlefont=f)
y <- list(title = "MPG", titlefont=f)plot_ly(x=mtcars$hp, y=mtcars$mpg, color = as.factor(mtcars$cyl),) %>% layout(xaxis=x,yaxis=y)