I'm trying to create a graph in ggplot
using the facet_wrap
argument.
However, I don't want the label over every small graph, I want a label only on top of the graph and on the left.
For example in the graph below, I would like to have at the top labels SI2, SI1, WS2, and on the left the labels D, E, F.
library(tidyverse)
df <- diamonds %>%
select(cut, color, clarity, price) %>%
filter(clarity %in% c("SI2", "SI1", "VVS2")) %>%
filter(color %in% c("D", "E", "F"))
df %>%
ggplot(aes(cut, price)) +
geom_boxplot() +
facet_wrap(~color + clarity)