I often make graphs that plot a mean or coefficient with a 95% error bar using -twoway scatter- and -twoway rcap-. The code below produces a legend with two entries: one for the mean marker symbol and one for the error bar. But I want the legend to display a single entry, showing the marker symbol and the error bar combined. Below is an example of how I usually make a graph.
sysuse auto
gen b = .
gen se = .
mean mpg if foreign == 1
replace b = _b[mpg] in 1
replace se = _se[mpg] in 1
mean mpg if foreign == 0
replace b = _b[mpg] in 2
replace se = _se[mpg] in 2
gen lb = b - (1.96 * se)
gen ub = b + (1.96 * se)
gen index = _n in 1/2
twoway scatter b index || rcap lb ub index, legend(order(1 "Mean" 2 "95% Interval"))
Is there an option in -legend- to allow me to overlay two legend entries in the way I want?