title: How can I increase room for ggplot y-axis?
body: <p>My plot is cutting off a portion of the y-axis when viewed and when saved as a jpeg. I am sure this is an easy fix, but I can't seem to figure it out. Any advice? Thanks</p>
  <p><a href="https://i.stack.imgur.com/cYX8p.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cYX8p.jpg" alt="enter image description here" /></a></p>
  <pre><code>treat_freqplot&lt;-ggplot(Treat_occur, aes(Trial, freq, fill = Treatment)) + geom_bar(stat = 'identity', alpha = 1) +  
    #facet_grid(~Trial, scales = &quot;free&quot;)+ 
    scale_y_continuous(labels = scales::percent, breaks=seq(0,100,1/10), expand=c(0,0)) +            
    labs(x = 'Trial', y = &quot;Proportional Deer Use&quot;)  + 
    #scale_x_discrete(guide = guide_axis(n.dodge = 2)) +
    scale_fill_manual(&quot;Treatment&quot;,values=c(&quot;dark Green&quot;, &quot;dark gray&quot;, &quot;fire brick 4&quot;,&quot;dark blue&quot;))+
    theme(axis.text = element_text(size=30, colour = &quot;black&quot;,vjust=0.3),axis.title=element_text(size=30,face=&quot;bold&quot;)) +
    theme(legend.position = &quot;right&quot;,legend.background = element_rect(color=&quot;black&quot;,linetype=&quot;solid&quot;, fill=&quot;gray100&quot;),
          legend.key.size = unit(1, 'cm'),legend.text = element_text(size=25), legend.title=element_text(size=30)) +
    theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),panel.background = element_rect(fill = NA, color = &quot;black&quot;)) 
  treat_freqplot
  
  #ggsave('C:\\Projects\\CaptiveStudy\\Analysis\\Output2\\treatfreq_plot.jpeg',
         width = 20, height = 12, units = &quot;in&quot;,treat_freqplot)
  </code></pre>
  <pre><code>structure(list(Trial = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 
  2L, 3L, 3L), .Label = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, 
  &quot;9&quot;, &quot;10&quot;, &quot;11&quot;, &quot;12&quot;, &quot;13&quot;, &quot;14&quot;), class = &quot;factor&quot;), Treatment = structure(c(1L, 
  2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 2L), .Label = c(&quot;Control&quot;, &quot;30%Shade&quot;, 
  &quot;60%Shade&quot;, &quot;90%Shade&quot;), class = &quot;factor&quot;), Use = c(1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L), n = c(2L, 7L, 5L, 30L, 1L, 2L, 6L, 
  45L, 9L, 3L), freq = c(0.037037037037037, 0.12962962962963, 0.0925925925925926, 
  0.555555555555556, 0.0185185185185185, 0.037037037037037, 0.111111111111111, 
  0.833333333333333, 0.166666666666667, 0.0555555555555556)), class = c(&quot;grouped_df&quot;, 
  &quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;), row.names = c(NA, -10L), groups = structure(list(
      Trial = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L
      ), .Label = c(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;, &quot;9&quot;, 
      &quot;10&quot;, &quot;11&quot;, &quot;12&quot;, &quot;13&quot;, &quot;14&quot;), class = &quot;factor&quot;), Treatment = structure(c(1L, 
      2L, 3L, 4L, 1L, 2L, 3L, 4L, 1L, 2L), .Label = c(&quot;Control&quot;, 
      &quot;30%Shade&quot;, &quot;60%Shade&quot;, &quot;90%Shade&quot;), class = &quot;factor&quot;), .rows = structure(list(
          1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L), ptype = integer(0), class = c(&quot;vctrs_list_of&quot;, 
      &quot;vctrs_vctr&quot;, &quot;list&quot;))), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;
  ), row.names = c(NA, -10L), .drop = TRUE))
  </code></pre>