```r}-font, fig.cap = "Testing fonts.", echo = TRUE} ggplot(d, aes(x = x, y = x, label = y)) + geom_text(size = 8) + labs(x = d$x, y = d$x, title = d$x, colour = d$y) + theme(axis.text.y = element_text(angle = 90, hjust = 0.5))
\FloatBarrier
```r}-boxplot, fig.cap = "geom_boxplot()", echo = TRUE}
ggplot(cancer, aes(x = Age, y = Proportion)) +
geom_boxplot() +
ggtitle("cancer dataset")
\FloatBarrier
``r}-facet-wrap, fig.cap = "Histogram split into subplots withfacet_wrap()`.", echo = TRUE}
ggplot(cancer, aes(x = Proportion)) +
geom_histogram(binwidth = 0.05) +
facet_wrap(~Age, scales = "free") +
ggtitle("cancer dataset")
\FloatBarrier
```r}-facet-grid, fig.cap = "Histogram split into subplots with `facet_grid()`.", echo = TRUE}
ggplot(cancer, aes(x = Proportion)) +
geom_histogram(binwidth = 0.05) +
facet_grid(alcgp ~ tobgp, scales = "free") +
ggtitle("cancer dataset")
\FloatBarrier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.