Path: blob/main/tests/docs/crossrefs/before-newcrossref-regression-tests/figure-margin.qmd
3587 views
--- title: figure-margin format: html --- ```{r} #| label: fig-mtcars #| fig-cap: "MPG vs horsepower, colored by transmission." #| column: margin library(ggplot2) mtcars2 <- mtcars mtcars2$am <- factor( mtcars$am, labels = c('automatic', 'manual') ) ggplot(mtcars2, aes(hp, mpg, color = am)) + geom_point() + geom_smooth(formula = y ~ x, method = "loess") + theme(legend.position = 'bottom') ``` ```{r} #| column: margin knitr::kable( mtcars[1:6, 1:3] ) ```