Remove blank lines from x axis in ggplot2
<p>I have a some trouble about removing the space in between x axis values. 
I want to remove the gap between two values in each <code>facet_wrap</code></p>

<p>I checked this post 
<a href="https://stackoverflow.com/questions/9625252/ggplot-geom-tile-spacing-with-facets">/ggplot-geom-tile-spacing-with-facets</a> and this one <a href="https://stackoverflow.com/questions/25460918/remove-blank-lines-from-plot-geom-tile-ggplot?rq=1">remove-blank-lines-from-plot-geom-tile-ggplot</a> but <code>scales=free_x</code> didnt helped at all. </p>

<p>Here is a reproducible example of mine </p>

<pre><code>set.seed(123)
library(ggplot2)

x &lt;-  rep(c(seq(2,40,length.out=8),seq(-2,-40,length.out=8)),times=1);
yy &lt;- replicate(1,c(sort(10^runif(8,-9,1),decreasing=TRUE), sort(10^runif(8,-6,1),decreasing=TRUE),sort(10^runif(8,-3,0),decreasing=TRUE)))
direc &lt;- rep(rep(c("A","B"),each=8),times=6)
add &lt;-rep(seq(1:4),each=12)
df &lt;- data.frame(x,yy,direc,add)

ggplot(data = df, aes(x = x, y = yy, colour=direc)) +
  geom_point(size=5)+
  geom_line(size=1.3)+
  scale_y_log10(limits = c(1e-7,1),breaks = c(3e-7,1e-3,1e-1,1))+
  scale_x_continuous(expand = c(0, 0),breaks=c(seq(-40,40,10)))+
  #scale_x_discrete(expand=c(0,0),drop=F)+
  #facet_grid(FIELD.Oe. ~ WER)+
  facet_wrap(~add)
</code></pre>

<p><a href="https://i.stack.imgur.com/Qlknx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qlknx.png" alt="enter image description here"></a></p>

<p>I want to remove the gap between <code>A</code> and <code>B</code> factors. I need is to remove the unused values from x axis. </p>