/* Reproduce Figure on p. 42 */ set scheme s2color #delimit ; graph twoway (lfit sbp age, lcolor(black) yaxis(1 2) xaxis(1 2)) (scatter sbp age, msymbol(O) mlwidth(medium) mcolor(black)), title("Figure 5-1: Scatter diagram of age and systolic blood pressure", size(medium) color(black) span) subtitle(" ") xtitle("", axis(2)) ytitle("Systolic blood pressure") note("Kleinbaum et al., p. 42", span) ylabel(100(20)220, angle(horizontal) glwidth(vvthin) glcolor(gs10)) ylabel(100(20)220, axis(2) nolabels noticks) xlabel(, axis(1) grid glwidth(vvthin) glcolor(gs10)) xlabel(, axis(2) nolabel noticks) legend(off) text(224 17.2 "Y") text(100 72 "X") aspectratio(1) plotregion(margin(zero)) graphregion(fcolor(white)) name(F51, replace) ; #delimit cr