title: Preserving order with geom_text_repel
body: <p>I'm trying to plot a number-line for floating point numbers (slightly simplified, with a sign bit, one bit for the coefficient (when not zero), and two bits for the exponent). I have this:</p>
  
  <pre><code>library(ggplot2)
  library(tibble)
  library(ggrepel)
  
  d &lt;- tribble(
    ~repr,             ~number,
   "1.1[2] %*% 2^-11", 2**-3 + 2**-4,
   "1.0[2] %*% 2^-11", 2**-3,
   "1.1[2] %*% 2^-10", 2**-2 + 2**-3,
   "1.0[2] %*% 2^-10", 2**-2,
   "1.1[2] %*% 2^-01", 2**-1 + 2**-2,
   "1.0[2] %*% 2^-01", 2**-1,
   "1.0[2] %*% 2^0",   1,
   "1.1[2] %*% 2^0",   1 + 2**-1,
   "0.0[2] %*% 2^0",   0,
   "1.1[2] %*% 2^01",   2 + 1,
   "1.0[2] %*% 2^01",   2,
   "1.1[2] %*% 2^10",   2**2 + 2**1,
   "1.0[2] %*% 2^10",   2**2,
   "1.1[2] %*% 2^11",   2**3 + 2**2,
   "1.0[2] %*% 2^11",   2**3,
  
   "-1.1[2] %*% 2^-11", -(2**-3 + 2**-4),
   "-1.0[2] %*% 2^-11", -(2**-3),
   "-1.1[2] %*% 2^-10", -(2**-2 + 2**-3),
   "-1.0[2] %*% 2^-10", -(2**-2),
   "-1.1[2] %*% 2^-01", -(2**-1 + 2**-2),
   "-1.0[2] %*% 2^-01", -(2**-1),
   "-1.0[2] %*% 2^0",   -1,
   "-1.1[2] %*% 2^0",   -(1 + 2**-1),
   "-1.1[2] %*% 2^01",  -(2 + 1),
   "-1.0[2] %*% 2^01",  -2,
   "-1.1[2] %*% 2^10",  -(2**2 + 2**1),
   "-1.0[2] %*% 2^10",  -2**2,
   "-1.1[2] %*% 2^11",  -(2**3 + 2**2),
   "-1.0[2] %*% 2^11",  -2**3
  )
  
  ggplot(d) +
    geom_text_repel(aes(x = number, y = -0.1, label = number),
                    parse = TRUE,
                    angle = 0,
                    ylim = c(NA, -0.1)) +
    geom_text_repel(aes(x = number, y = 0.1, label = repr),
                    angle = 0,
                    parse = TRUE, direction = "both", #angle = 90,
                    ylim = c(0.1, NA)) +
    geom_hline(yintercept = 0) +
    coord_cartesian(ylim = c(-2, 2)) +
    labs(x = NULL, y = NULL) +
    theme_classic() +
    theme(axis.line.y = element_blank(),
          axis.ticks = element_blank(),
          axis.text = element_blank())
  </code></pre>
  
  <p>The result looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/iysr4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iysr4.png" alt="Number line plot"></a></p>
  
  <p>This is almost what I want, but I would prefer if the labels were ordered, left to right, in the same order as the numbers (and I would like to avoid crossing any lines).</p>
  
  <p>Is there a way to avoid crossing any lines with <code>geom_text_repel</code>? I don't mind having a larger spread of labels around zero, where there is a lot of values, I just think it is hard to read the plot as it is, since the labels are scrambled in order the way they are.</p>