Stata graph and yline -
I have the following twoway scatter and I see two
to plot ylines and start and stop them on setting x-value
Set all distinct auto detective auto twoway scatter to MPG load, // connect (L) sort // / Xline (2500) /// yline (25) I have a range of 1500 to 2800 and the other xline yline > Should be a xline from 2900 to 4100. I also want a data point to connect.
must use a hack assistant variable:
All Sizes Set more than Auto Clear ----- First yline ----- gen xli =. Xli = 1500 instead of 1 in Xli = 2800 in L GIL = 25 = 25 * ----- replace second yin ----- in General xxli = xxli = 2 900 xxli = 4100 Change g General Yeli = 20 * ----- First Xline ----- General Yiuli =. Yyyli = 1 in yyyli = 40 in l gene xxxli = 2500 * ----- graph ----- twoway scatter MPG weight, connect (L) type || /// line yli xli || Line Yily X Axley /// Yilines || Line yyyli xxxli // xline I suspect that this is the best technique, but it seems to work. You must at least work on mythology and line colors. Help & lt; Command & gt; And there's a lot in the stat manual (and more) on it.
Comments
Post a Comment