title: How can I persuade ggplot2 geom_text to label a specified date in a time series plot?
body: <p>I am using ggplot2 to plot simple line charts of time series data. One difficulty I have run into is labelling specific points corresponding to x-axis values i.e. dates.</p>
  
  <pre><code>library(ggplot2)
  library(scales)
  date &lt;- c("2011-09-19","2011-09-20","2011-09-21",
      "2011-09-22","2011-09-23","2011-09-26","2011-09-27")
  price &lt;- c(100,110,105,115,120,115,125)
  tmp &lt;- data.frame(date,price)
  tmp$date &lt;- as.Date(tmp$date)
  p &lt;- ggplot(tmp,aes(tmp$date,tmp$price))
  p &lt;- p + xlab("Date")
  p &lt;- p + ylab("Price")
  p &lt;- p + layer(geom = "line")
  p &lt;- p + opts(title="Simple price plot")
  print(p)
  </code></pre>
  
  <p>What I would like to do is add an annotation to a specific date, which might be a maximum or a minimum value or something else of note. So far all the permutations of geom_text I have used have failed to get the effect I want (or indeed anything useful). There are a few questions on this on SO but most seem related to scatter charts rather than time series; I haven't been successful in trying to adapt them. I have also spent some time with the documentation but my understanding is still limited. Any pointers would be appreciated.</p>