Description Usage Arguments Value Examples
Adds a dummy text layer to a ggplot to label facets and sets facet strips to blank. This is the typical formatting for some journals that consider facets as subfigures and want to minimise margins around figures.
1 2 3 4 5 |
p |
ggplot |
open |
opening character, default: ( |
close |
closing character, default: ) |
tag_fun_top |
labelling function |
tag_fun_right |
labelling function |
x |
x position within cell |
y |
y position within cell |
hjust |
hjust |
vjust |
vjust |
fontface |
fontface |
family |
font family |
draw |
logical: draw the resulting gtable |
... |
further arguments passed to geom_text layer |
plot with facet strips removed and replaced by in-panel tags
1 2 3 4 5 6 7 8 9 10 11 12 | library(ggplot2)
d = data.frame(
x = 1:90,
y = rnorm(90),
red = rep(letters[1:3], 30),
blue = c(rep(1, 30), rep(2, 30), rep(3, 30)))
p <- ggplot(d) +
geom_point(aes(x = x, y = y)) +
facet_grid(red ~ blue)
tag_facet_outside(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.