title: How to maintain size of ggplot with long labels
body: <p>I have a plot that is a simple barplot of number of each type of an event. I need the labels of the plot to be under the plot as some of the events have very long names and were squashing the plot sideways. I tried to move the labels underneath the plot but it now gets squashed upwards when there are lots of event types. Is there a way of having a static plot size (i.e. for the bar graph) so that long legends don't squash the plot?</p>
  
  <p>My code:</p>
  
  <pre><code>ggplot(counts_df, aes(x = Var2, y = value, fill - Var1)+
      geom_bar(stat = "identity") +
      theme(legend.position = "bottom") +
      theme(legen.direction = "vertical") +
      theme(axis.text.x = element_text(angle = -90)
  </code></pre>
  
  <p>The result:</p>
  
  <p><a href="https://i.stack.imgur.com/zJjs5.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/zJjs5.jpg" alt="enter image description here"></a></p>
  
  <p>I think this is because the image size must be static so the plot gets sacrificed for the axis. The same thing happens when I put a legend beneath the plot.</p>