title: How can I prevent geom_text from overlapping labels?
body: <p>I'm using <code>geom_text</code> from <code>ggplot</code> to annotate each of my plots in a <code>facet_wrap</code>. My code is shown below. <code>num_zeros_text</code> is just a dataframe with a single column, <code>label</code>, with a number in each row. I'm trying to follow the answer posted by Kamil Slowikowski in <a href="https://stackoverflow.com/questions/11889625/annotating-text-on-individual-facet-in-ggplot2">this</a> post. For some reason, my labels are ending up &quot;overlapping&quot; each other (see picture below), where essentially all numbers from the dataframe <code>num_zeros_text</code> are being displayed on each plot (I believe). I can't figure out why.</p>
  <pre><code>  ggplot(normalized_counts_subsampled, aes(value)) +
      geom_histogram() +
      facet_wrap(~bins, 100) +
      geom_text(data = num_zeros_text,
                aes(x = 0.75, y=50, label=label))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/x3NrF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x3NrF.png" alt="enter image description here" /></a></p>