I'm trying to understand why the outputs of facet_grid()
and facet_wrap()
are different, even though the inputs are the same:
facet_grid
ggplot(temp, aes(x = valor)) +
geom_histogram(binwidth = 5, fill = NA, color = "black") +
facet_grid(estratificacao ~ referencia, scales = "free") +
scale_x_continuous(breaks = seq(0, 100, 10)) + theme_classic()
facet_wrap
ggplot(temp, aes(x = valor)) +
geom_histogram(binwidth = 5, fill = NA, color = "black") +
facet_wrap(estratificacao ~ referencia, scales = "free") +
scale_x_continuous(breaks = seq(0, 100, 10)) + theme_classic()
See, the argument scales = "free"
does not have the same behaviors for facet_grid()
and facet_wrap()
. What can explain that?