tag_facet_outside.RdAdds 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.
ggplot
opening character, default: (
closing character, default: )
labelling function
labelling function
x position within cell
y position within cell
hjust
vjust
fontface
font family
logical: draw the resulting gtable
further arguments passed to geom_text layer
plot with facet strips removed and replaced by in-panel tags
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)