title: Stop labels in ggplot2 from overlapping
body: <p>My data is as follows:</p>
  <pre><code>df &lt;- structure(list(Reportable = c(&quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, 
  &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, 
  &quot;Reportable Injury&quot;, NA, &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, 
  &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, 
  &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, 
  &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, 
  &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, 
  &quot;Non-Reportable Injury&quot;, &quot;Reportable Injury&quot;, &quot;Non-Reportable Injury&quot;, 
  &quot;Reportable Injury&quot;), Event_Description = c(NA, NA, &quot;OVEREXERTION&quot;, 
  &quot;OVEREXERTION&quot;, &quot;SLIPPED, FELL, STUMBLED, OTHER&quot;, &quot;SLIPPED, FELL, STUMBLED, OTHER&quot;, 
  &quot;SLIPPED, FELL, STUMBLED, OTHER&quot;, &quot;STRUCK BY OBJECT&quot;, &quot;STRUCK BY OBJECT&quot;, 
  &quot;STRUCK AGAINST OBJECT&quot;, &quot;STRUCK AGAINST OBJECT&quot;, &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO CLIMATIC CONDITION (RAIN, SNOW, ICE, E&quot;, 
  &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO CLIMATIC CONDITION (RAIN, SNOW, ICE, E&quot;, 
  &quot;CAUGHT, CRUSHED, PINCHED, OTHER.&quot;, &quot;CAUGHT, CRUSHED, PINCHED, OTHER.&quot;, 
  &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO OBJECT, E.G.,BALLAST, SPIKE, MATERIAL,&quot;, 
  &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO OBJECT, E.G.,BALLAST, SPIKE, MATERIAL,&quot;, 
  &quot;ASSAULTED BY OTHER&quot;, &quot;ASSAULTED BY OTHER&quot;, &quot;LOST BALANCE&quot;, &quot;LOST BALANCE&quot;, 
  &quot;STRUCK BY FALLING OBJECT&quot;, &quot;STRUCK BY FALLING OBJECT&quot;, &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO IRREGULAR SURFACE, E.G., DEPRESSION, S&quot;, 
  &quot;SLIPPED, FELL, STUMBLED, ETC. DUE TO IRREGULAR SURFACE, E.G., DEPRESSION, S&quot;
  ), count = c(238L, 33L, 62L, 202L, 33L, 108L, 1L, 36L, 85L, 37L, 
  48L, 22L, 55L, 21L, 52L, 14L, 41L, 9L, 34L, 7L, 32L, 13L, 25L, 
  8L, 27L), pct = c(&quot;88%&quot;, &quot;12%&quot;, &quot;23%&quot;, &quot;77%&quot;, &quot;23%&quot;, &quot;76%&quot;, &quot;1%&quot;, 
  &quot;30%&quot;, &quot;70%&quot;, &quot;44%&quot;, &quot;56%&quot;, &quot;29%&quot;, &quot;71%&quot;, &quot;29%&quot;, &quot;71%&quot;, &quot;25%&quot;, 
  &quot;75%&quot;, &quot;21%&quot;, &quot;79%&quot;, &quot;18%&quot;, &quot;82%&quot;, &quot;34%&quot;, &quot;66%&quot;, &quot;23%&quot;, &quot;77%&quot;
  ), total = c(&quot;238 (88%)&quot;, &quot;33 (12%)&quot;, &quot;62 (23%)&quot;, &quot;202 (77%)&quot;, 
  &quot;33 (23%)&quot;, &quot;108 (76%)&quot;, &quot;1 (1%)&quot;, &quot;36 (30%)&quot;, &quot;85 (70%)&quot;, &quot;37 (44%)&quot;, 
  &quot;48 (56%)&quot;, &quot;22 (29%)&quot;, &quot;55 (71%)&quot;, &quot;21 (29%)&quot;, &quot;52 (71%)&quot;, &quot;14 (25%)&quot;, 
  &quot;41 (75%)&quot;, &quot;9 (21%)&quot;, &quot;34 (79%)&quot;, &quot;7 (18%)&quot;, &quot;32 (82%)&quot;, &quot;13 (34%)&quot;, 
  &quot;25 (66%)&quot;, &quot;8 (23%)&quot;, &quot;27 (77%)&quot;)), row.names = c(NA, -25L), class = c(&quot;tbl_df&quot;, 
  &quot;tbl&quot;, &quot;data.frame&quot;))
  
  </code></pre>
  <p>So it's a lot of verbage and as a result in RMarkdown all the percentages are overlapping each other as are the labels of the bars. How would I avoid this?</p>
  <pre><code>library(ggplot2)
  library(ggthemes)
  library(stringr)
  
  ggplot(event_counts, aes(fill=Reportable, y=count, x=as.factor(Event_Description), label = total)) +
    geom_bar(position=&quot;dodge&quot;, stat=&quot;identity&quot;)+
    aes(stringr::str_wrap(as.factor(Event_Description), 15), count) +
    labs(x = &quot;&quot;, y = &quot;Injury Count&quot;, fill = &quot;&quot;)+
    geom_text(position = position_dodge(width = .9),     #move to center of bars
              vjust = -0.5,     #nudge above top of bar
              size = 3) +
    ggtitle(&quot;Title&quot;)+
    scale_fill_manual(values = c(&quot;darkorange&quot;, &quot;cornflowerblue&quot;) ) +
    theme_hc() +
    theme(axis.text.x=element_text(angle = 90, vjust = 0.5))
  
  </code></pre>
  <p>As you can see from the plot above, the words are running on each other and in many places we see there are percentages running over eachother.</p>
  <p>Because this is done in Markdown, I can't simply drag it bigger. :(</p>