Dear Stata users,

I am using Stata 15 and trying to plot changes in sb1 vs years by age-groups (4 different models). This graph that I plotted makes artifacts (not smooth lines). I am wondering how to construct plots with nice smooth lines?

Here is the code used to draw the graph:
PHP Code:
set scheme s1color
tw  
(lowess sb1 yrs if age_gr==1, sort lcolor(blue)) ///
    
(lowess sb1 yrs if age_gr==2, sort lcolor(orange)) ///
    
(lowess sb1 yrs if age_gr==3, sort lcolor(green)) ///
    
(lowess sb1 yrs if age_gr==4, sort lcolor(cranberry)) /// 
    
(lowess sb1 yrs if age_gr==5, sort lcolor(yellow)) ||, by(model, col(2) compact)  ///
     
ylab(-3 -2 -1  0 1)  xlab(0 5 10 15 20 25 30 35) ///
     
leg(all) xtitle("years") ytitle("change isn sb1") ///
     
ylab(, grid) yline(0) xsize(6) ysize(4.5) 

Thank you very much
Oyun
Array