title: Stata: Place label on top of vertical line in twoway graph
body: <p>I would like to place a label on top of a vertical line as done in the example below. I am looping over a variety of variables and therefore the y position I have to specify in the <code>ttext()</code> option varies. How could I automate that it gets placed on top of the vertical line? </p>
  
  <p>(I tried to get the maximum of a variable into a scalar. However, the ceiling of the maximum does not always match the highest y value Stata chooses for your graph.)</p>
  
  <pre><code>twoway (tsline var, recast(connected)), tline(642) ttext(106 642 "start")
  </code></pre>