title: Set the width and gap in geom_bar in a large dataset with a lot of unique values
body: <p>I have the dataframe below:</p>
  
  <pre><code>res&lt;-sample.int(2187, 2187)
  freq&lt;-floor(runif(2187, 95,105))
  t&lt;-data.frame(res,freq)
  </code></pre>
  
  <p>and Im trying to create a bar chart based on this but despite the fact that I use <code>width</code> and <code>color</code> arguments I still cannot create space between the bars which are black instead of the selected <code>fill</code>. </p>
  
  <pre><code>library(ggplot2)
  require(scales)
  ggplot(t,width=0.1)+
    geom_bar(aes(x=res,y=freq ,fill = (t$res==101)),
                color = "black",stat = "identity") +
    scale_fill_manual(values=c("darkblue", "lightblue"), guide = F) +
    theme_classic(base_size = 16)+ theme(legend.position = "none")+
    scale_x_discrete(breaks = seq(80, 115, 5))+ scale_y_continuous(labels = comma)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pgBL7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pgBL7.png" alt="enter image description here"></a></p>
  
  <p>Note that this code works nice for a dataset with much fewer unique values like:</p>
  
  <pre><code>fac&lt;-factor(rep(c(80,85,100,100.5,100.7,101,101.5,110,105),2000000))
  res&lt;-data.frame(fac)
  new&lt;-data.frame(table(res))
  require(scales)
  ggplot(new,width=0.1)+
    geom_bar(aes(x=res,y=Freq ,fill = (new$res==101)),
                color = "black",stat = "identity") +
    scale_fill_manual(values=c("darkblue", "lightblue"), guide = F) +
    theme_classic(base_size = 16)+ theme(legend.position = "none")+
    scale_x_discrete(breaks = seq(80, 115, 5))+ scale_y_continuous(labels = comma)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JrHFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JrHFh.png" alt="enter image description here"></a></p>