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==1sort lcolor(blue)) ///
    
(lowess sb1 yrs if age_gr==2sort lcolor(orange)) ///
    
(lowess sb1 yrs if age_gr==3sort lcolor(green)) ///
    
(lowess sb1 yrs if age_gr==4sort lcolor(cranberry)) /// 
    
(lowess sb1 yrs if age_gr==5sort lcolor(yellow)) ||, by(modelcol(2compact)  ///
     
ylab(---1  0 1)  xlab(0 5 10 15 20 25 30 35///
     
leg(allxtitle("years"ytitle("change isn sb1"///
     
ylab(, gridyline(0xsize(6ysize(4.5

Thank you very much
Oyun
Array