::: {.cell layout-align="center"}

```{.r .cell-code}
ggplot(data = mtcars, aes(x = wt, y = mpg, color = as.factor(cyl))) +
  geom_point() +
  ggtitle("MPG vs Weight of Cars") +
  xlab("Weight (1000 lbs)") +
  ylab("Miles per Gallon") +
  labs(color = "Cylinders")
```

::: {.cell-output-display}
![](ggplot2_basics_slides_files/figure-revealjs/unnamed-chunk-3-1.png){fig-align='center' width=960}
:::
:::