This webpage was created as part of the Developing Data Products assignment.
The plot below is an interactive Plotly visualization of the famous mtcars dataset.
fig <- plot_ly(
data = mtcars,
x = ~wt,
y = ~mpg,
type = "scatter",
mode = "markers",
color = ~factor(cyl),
colors = "Set1"
) %>%
layout(
title = "Fuel Economy vs Vehicle Weight",
xaxis = list(title = "Weight (1000 lbs)"),
yaxis = list(title = "Miles per Gallon"),
legend = list(title = list(text = "Cylinders"))
)
fig