title: How to annotate line plot with arrow and maximum value?
body: <p>I am trying to annotate a line plot with an arrow pointing to the highest point in line plot and displaying an arrow and maximum value on the plot. I am using the <code>mtcars</code> dataset as my reference. Below is my code.</p>
  
  <pre><code>e &lt;- df$mpg
  ggplot(df, aes(x=e, y=df$hp)) + 
    geom_line() + 
    annotate("segment", color="blue", x=max(e), xend = max(e), y=max(df$hp), 
              yend=max(df$hp), arrow=arrow())
  </code></pre>
  
  <p>Thanks in advance,</p>