Facet_grid with many factors becomes unreadable / increase plot size?

Sorry if this is a very trivial question, but I spent a few hours on this. I have a ggplot with a facet grid that includes multiple factors. The problem is that the headings of the faces are not readable. "Too much".

facet_grid (years.since.peace ~ type_of_termination + strategy.cm6.YP)

I know that I can change the font size of the panel titles or split it into several different graphs. But I'm interested in increasing the area of ​​the lot so that there is enough room for all the panel / face titles? The graph will most likely end up in the form of a poster, so printing it like A2 would be fine.

I've checked the space, scale, and compression options - but they don't seem to be intended for what I'm trying to do. I also tried changing the pdf () command with its width and height parameters. But the graph just gets bigger without solving the problem of unreadable facet headers.

Maybe I am just wrong about what I am trying to do?

enter image description here

+3


source to share


1 answer


you may try:



library(ggplot2)
ggsave('testplot.png', height = 11, width = 8.5)

      

+1


source







All Articles