Thanks to Kit Baum, a new package called addlegend is available from SSC. To install, type:
addlegend is a utility to create a do-it-yourself legend and add it to a twoway graph. In contrast to Stata's legend() option, addlegend can combine multiple symbols in a single legend key. Here's an example:

See github.com/benjann/addlegend for some further examples.
ben
Code:
. ssc install addlegend, replace
Code:
sysuse auto
twoway (sc mpg turn, msize(large) ms(Oh)) ///
(sc mpg turn, msize(large) ms(X) pstyle(p1)) ///
(lfit mpg turn, pstyle(p2))
addlegend, y(50) x(105) margin(r=40): ///
(Oh X) "Mileage (mpg)", msize(large) ///
|| (line) "Fitted values"
See github.com/benjann/addlegend for some further examples.
ben

Comment