title: Adding label for last point of line in R plot
body: <p>Consider the following plot:</p>
  
  <pre><code> par(xaxs='i',yaxs='i')
   q1 &lt;- c(1000000.0,  908364.8,  876009.1,  847892.8,  824808.3,  805416.2,  785266.2, 770997.1,  753908.6,  744599.9,  706777.6,  674659.9,  634654.4,  601440.4, 568259.7,  535361.3,  493679.9,  465526.5,  429766.6,  395244.7,  361483.2, 332136.6, 308574.5, 285500.6, 262166.2 ,237989.0 , 210766.1,  188578.1, 166762.3 , 140399.8  ,114865.5)
   plot(q1, type = "l", lty = 1, lwd = 2, col = "darkolivegreen3", ylim = c(0,4*10^6), xlim = c(1,30), bty = "l")
   text(30, q1[30], labels = "text", col = "gray36", cex = 0.8, pos = 4)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/UEcTN.jpg" alt="enter image description here"></p>
  
  <p>I would like to add the label "text" at the right of the last point of the green line (i.e. the point on the line with x = 30).</p>
  
  <p>I tried the code above but the text doesn't show up! Any ideas how to solve that?
  Thanks!</p>