title: How to add label to geom_segment at the start of the segment?
body: <p>I'm sure this is simple but I can't figure it out.</p>
  
  <p>I have the following chart:  </p>
  
  <pre><code>library(data.table)
  library(magrittr)
  library(ggplot2)
  
  cambodia &lt;- 
      data.table(Period = c("Funan", "Chenla/Zhenla","Khmer Empire","Dark Ages of Cambodia"),
                 StartDate = c(-500,550,802,1431), 
                 EndDate = c(550,802,1431,1863), 
                 Color = c("lightblue","lightgreen","lightyellow","pink")) %&gt;%
      extract(order(-StartDate)) %&gt;%
      extract(, Period := factor(Period,levels = Period))
  
  ggplot() +
      geom_segment(data=cambodia, aes(x=StartDate, xend=EndDate, y=Period, yend=Period, color=Color), 
                   linetype=1, size=2) +
      scale_colour_brewer(palette = "Pastel1")+
      xlab("Date")+
      ylab("Ruler")+
      theme_bw() + 
      theme(panel.grid.minor = element_blank(), panel.grid.major =   element_blank()) + 
      theme(aspect.ratio = .2) +
      theme(legend.position="none")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OytPx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OytPx.png" alt="enter image description here"></a></p>
  
  <p>But I would like the labels to be off the axis and on the page. Either to the left or on top of the middle of the line. E.g.</p>
  
  <p><a href="https://i.stack.imgur.com/zpesF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zpesF.png" alt="enter image description here"></a></p>
  
  <p>Most of the examples of geom_text give me gobbledeegook. I can't seem to apply them to the factor data I have here. Do you know how to do this? 
  Thank you</p>