This slidedeck will showcase a plot using the "mtcars" dataset and will use the plot_ly library
1/13/2019
This slidedeck will showcase a plot using the "mtcars" dataset and will use the plot_ly library
Below is the code that will be used to create the plot (please refer for next slide for the plot)
#Load 'plot_ly' library
suppressPackageStartupMessages(require(plotly))
#Load 'mtcars' dataset
data("mtcars")
#create the plot
plot_ly(mtcars, x=~wt, y=~mpg, type="scatter")
Below is the result of the code from the previous slide:
## No scatter mode specifed: ## Setting the mode to markers ## Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode