One hack would be to use auxiliary variables:
clear all
set more off
sysuse auto
*----- first yline -----
gen xli = .
replace xli = 1500 in 1
replace xli = 2800 in l
gen yli = 25
*----- second yline -----
gen xxli = .
replace xxli = 2900 in 1
replace xxli = 4100 in l
gen yyli = 20
*----- first xline -----
gen yyyli = .
replace yyyli = 15 in 1
replace yyyli = 40 in l
gen xxxli = 2500
*----- graph -----
twoway scatter mpg weight, connect(l) sort || ///
line yli xli || line yyli xxli /// ylines
|| line yyyli xxxli // xline
I doubt it's the best technique, but it seems to work. You would need to work at least on the legend and line colors. help <command>
and the Stata manuals have a lot on that (and much more).