title: ggplot add annotation box, arrow with dynamic value in it
body: <p>I am trying to add an annotation box in plot (using ggplot). I have added the text using text geom in annotate. The logic should be - every time when we generate the plot, it should have the text box with latest month and value in it. And the text box should point the corresponding value in the plot using an arrow or line. Here is what I tried so far, </p>
  
  <pre><code> myplot &lt;-  ggplot(sa_dat1,  aes(x = variable,  y = value )) + 
          theme_minimal() +
          geom_line(linetype = "solid", color = "#0072CE",size=1) +
          geom_smooth(method="loess", se=FALSE , linetype = "dashed", color="black", size = 0.5) + 
          scale_x_date(labels = date_format("%b-%Y"), date_breaks  ="2 month",expand = c(0.005,0)) +
          theme(axis.text.x = element_text(angle = 90, hjust = 1,vjust=0.5)) +
          scale_y_continuous(limits=c(ylimitmin5,ylimitmax5), labels=dollar_format(prefix="$"),
                   breaks  = seq(ylimitmin5, ylimitmax5, by = 10000),
                   expand = c(0,0)) +
          annotate("text", x=floor_date(max(sa_dat1$variable), "month") - months(12), 
             y= max(sa_dat1$value) - 20000, label = paste0("April 2017\n",
  paste("$",round(max(sa_dat1$value)))))
  </code></pre>
  
  <p>And here is what I have got,
  <a href="https://i.stack.imgur.com/wpOqU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wpOqU.png" alt="enter image description here"></a></p>
  
  <p>What I am aiming for is this, I don't know how to add the arrow and text box around my text. </p>
  
  <p><a href="https://i.stack.imgur.com/NGsDh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NGsDh.png" alt="enter image description here"></a></p>