title: Stata - Scatter plot confidence interval
body: <p>I am trying to connect two dots to represent a confidence interval of the following dataset.</p>
  
  <pre><code>Y          Y_upper_ci          Y_lower_ci           X
  10           12                    8                1
  20           22                    14               2
  30           37                    22               3
  40           42                    33               4
  50           53                    48               5
  </code></pre>
  
  <p>I have been using the following.</p>
  
  <pre><code>twoway scatter Y Y_upper_ci Y_lower_ci X,  ///
    connect(l) sort ///
    title("Main Title") ///
    subtitle("Subtitle") ///
    ytitle(Y) ///
    xtitle(X)
  </code></pre>
  
  <p>I thought <code>connect(l)</code> would take care of this, but it only connects the Y and not the <code>Y_upper_ci</code> to the <code>Y_lower_ci</code>.</p>
  
  <p>Also, how can I have the legend only return the label on <code>Y</code> and not <code>Y_upper_ci</code> and <code>Y_lower_ci</code>?</p>