title: Horizontal white lines in ggplot bar graph
body: <p>When I save a graph from R using ggplot2 and <code>geom_col()</code> or <code>geom_bar(stat = 'identity')</code> it comes out with some unsightly horizontal white lines.</p>
  <p>Data looks like this:</p>
  <pre><code>&gt; head(mouse_track_data)
  session site BM.pile ox.pile       type  mice skinks geckos 
  1 dec_2018    1       1    1.10 control FALSE   TRUE  FALSE            
  2 dec_2018    1       2    1.12 design1 FALSE  FALSE  FALSE           
  3 dec_2018    1       3    1.11 control FALSE  FALSE  FALSE            
  4 dec_2018    1       4    1.80 control FALSE  FALSE  FALSE            
  5 dec_2018    1       5    1.60 design1 FALSE  FALSE  FALSE            
  6 dec_2018    1       6    1.50 control FALSE  FALSE  FALSE            
  </code></pre>
  <p>Here's my code:</p>
  <pre><code>ggplot(data = mouse_track_data, aes(x = session, y = as.numeric(mice), fill = type)) + 
    geom_bar(stat='identity') +
    theme_classic() +
    theme(text = element_text(size=15),
          axis.text.x = element_text(angle = 45, hjust = 1)) +
    xlab(&quot;Tracking session&quot;) +
    ylab(&quot;Number of tunnels with mouse tracks&quot;) +
    theme(axis.title.y = element_text(margin = margin(t = 0, r = 7, b = 0, l = 0))) +
    theme(axis.title.y = element_text(margin = margin(t = 0, r = 7, b = 0, l = 0)))  +
    theme(legend.title = element_blank(), legend.position = c(-2, -2)) +
    scale_fill_manual(values = c(&quot;control&quot; = &quot;#37a1c1&quot;, &quot;design1&quot; = &quot;#9ce2cb&quot;, &quot;design2&quot; = &quot;#445a9c&quot;),
                      labels = c(&quot; Control&quot;, &quot; Single grade&quot;, &quot; Mixed grade&quot;)) +
    scale_x_discrete(labels = c('Dec 2019', &quot;April 2019&quot;, &quot;Nov 2019&quot;, &quot;March 2020&quot;)) +
    scale_y_continuous(breaks=seq(0, 50, 10), limits = c(0,52), expand = c(0,0)) +
    theme(axis.line = element_blank())
  </code></pre>
  <p>With this, or using <code>geom_col()</code>, when exporting as ESP or PDF, I get a figure that looks like this:</p>
  <p><a href="https://i.stack.imgur.com/B5fwt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B5fwt.jpg" alt="graph using EPS" /></a></p>
  <p>With fine white lines going accross all the columns. I assume this is something to do with it counting each data point and then piling them up?</p>
  <p>If I do the code with <code>geom_bar()</code> it doesn't have white lines but it doesn't show the data how I want it.</p>