title: Histogram with discontinuous x-axis
body: <p>I need to realize an histogram in R. I add a picture to represent the desired results. I had tried to use both <code>ggplot2</code> and the base function <code>hist</code>. I used this code (ggplot) to get the basic histogram, but I would like to add the option to set the x-axis as shown in the figure (exactly the same values). Can someone tell me how to do that?</p>
  <p>My imput file <code>DataLig2</code> contains a list of objects and for each of these is associated a value (N..of.similar..Glob.Sum...0.83..ligandable.pockets). I need to plot the frequencies of all the reported values. The lowest value is 1 and the highest is 28. There aren't values from 16 to 27 so I would like to skip thi range in my plot.</p>
  <p>example of imput file:</p>
  <pre><code>Object;N..of.similar..Glob.Sum...0.83..ligandable.pockets
  1b47_A_001;3
  4re2_B_003;1
  657w_H_004_13
  1gtr_A_003;28
  ...
  </code></pre>
  <p>my script:</p>
  <pre><code>ggplot(dataLig2, aes(dataLig2$N..of.similar..Glob.Sum...0.83..ligandable.pockets, fill = group)) + geom_histogram(color=&quot;black&quot;) + 
    scale_fill_manual(values = c(&quot;1-5&quot; = &quot;olivedrab1&quot;,
                                 &quot;6-10&quot; = &quot;limegreen&quot;,
                                 &quot;11-28&quot; = &quot;green4&quot;))
  </code></pre>
  <p>Can you also suggest a script with the <code>hist</code> base function to get the same graph (with spaced bars as in the figure shown)? Thank you!</p>
  <p><a href="https://i.stack.imgur.com/h4FLI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h4FLI.png" alt="enter image description here" /></a></p>