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

```{.r .cell-code}
ggplot(data = ggplot2::diamonds, aes(x = price/carat, fill=color)) +
  geom_density(alpha=0.5) +
  facet_grid(rows = vars(color), cols = vars(cut)) +
  scale_x_sqrt() + 
  labs(x = "Price per carat")
```

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