How do you remove the variables that are left over on the x-axis of each subplot?

df
Empresa Id operador Horario inicio fim Vocalizacao
1 A 5007 A noite 00:04 00:34 nao
2 A 5019 F noite 00:50 01:21 nao
3 A 5023 A noite 23:13 23:41 sim
4 A 5024 A noite 23:57 00:27 nao

library(ggplot2)

ggplot(df, aes(operador, fill = Vocalizacao)) +
geom_bar() +
theme_minimal() +
facet_wrap(~Empresa)

Add the scales argument to facet_wrap().

facet_wrap(~Empresa, scales = 'free_x')

it worked, thank you very much

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.