I'm generating a lot of faceted graphs with discrete x-axis inside my R scripts. Sometimes, I get overlapping labels in x-axis, and I would like to avoid it:

Since I don't know in advance how big the graph is going to be (number of facets and breaks), I can't assign it manually to ggsave.
Any tips or best practices in this case?