IoSlides Presentation Created by Isaac Layton
Using the included mtcars dataset.
2026-04-13
IoSlides Presentation Created by Isaac Layton
Using the included mtcars dataset.
plot_ly( data = mtcars, x = ~hp, y = ~mpg, type = "scatter", mode = "markers", color = ~factor(cyl), #dif colors for dif num of cylinders size = ~wt, sizes = c(10, 50), marker = list(opacity = 0.8) )
\[ y = \beta_0 + \beta_1 x + \epsilon \]
\[ \beta_1 = \frac{\Delta y}{\Delta x} \]
– This is the avg change in mpg for each horsepower added.
ggplot(
data= mtcars,
aes(
x = hp,
y = mpg,
color = factor(cyl),
size = wt
)
) + geom_point(alpha = 0.8)