在做线图的时候,按照每一年分城乡统计均值,想在图中把每一年均值的数字标签表示出来,应该怎么写命令?
这是我原来的命令
graph twoway line x year ,by(chengxiang)connect(line)clpattern (longdash) lcolor (grey) legend(row(3)position(10)ring(0))xtitle("") ytitle("Mean total number of children")xlabel(2012 2013 2015 2017)ylabel(minmax)yaxis(1 2) saving(Fig_m1,replace)
------------------------ copy starting from the next line -----------------------
- * Example generated by -dataex-. For more info, type help dataex
- clear
- input float(x chengxiang year)
- 2.685028 0 2013
- 2.3698075 1 2017
- 2.527976 0 2015
- 2.685028 1 2013
- 2.794905 1 2012
- 2.794905 0 2012
- 2.794905 1 2012
- 2.3698075 1 2017
- 2.527976 1 2015
- 2.3698075 1 2017
- 2.794905 1 2012
- 2.3698075 0 2017
- 2.527976 1 2015
- 2.685028 0 2013
- 2.3698075 0 2017
- 2.527976 1 2015
- 2.527976 0 2015
- 2.794905 1 2012
- 2.794905 0 2012
- 2.3698075 0 2017
- 2.3698075 1 2017
- 2.527976 0 2015
- 2.685028 1 2013
- 2.527976 1 2015
- 2.3698075 1 2017
- 2.3698075 1 2017
- 2.794905 1 2012
- 2.527976 1 2015
- 2.685028 0 2013
- 2.3698075 0 2017
- 2.685028 0 2013
- 2.3698075 0 2017
- 2.3698075 0 2017
- 2.3698075 1 2017
- 2.3698075 1 2017
- 2.3698075 1 2017
- 2.3698075 0 2017
- 2.527976 1 2015
- 2.685028 0 2013
- 2.3698075 1 2017
- 2.3698075 0 2017
- 2.794905 0 2012
- 2.794905 1 2012
- 2.527976 0 2015
- 2.794905 0 2012
- 2.794905 0 2012
- 2.3698075 0 2017
- 2.3698075 0 2017
- 2.3698075 1 2017
- 2.527976 0 2015
- 2.3698075 1 2017
- 2.527976 1 2015
- 2.527976 1 2015
- 2.3698075 0 2017
- 2.3698075 1 2017
- 2.794905 1 2012
- 2.527976 1 2015
- 2.685028 1 2013
- 2.794905 1 2012
- 2.685028 0 2013
- 2.3698075 1 2017
- 2.3698075 1 2017
- 2.527976 0 2015
- 2.527976 0 2015
- 2.794905 1 2012
- 2.685028 0 2013
- 2.3698075 0 2017
- 2.685028 1 2013
- 2.794905 0 2012
- 2.685028 1 2013
- 2.794905 0 2012
- 2.3698075 1 2017
- 2.685028 0 2013
- 2.794905 1 2012
- 2.527976 0 2015
- 2.794905 1 2012
- 2.685028 0 2013
- 2.3698075 0 2017
- 2.3698075 1 2017
- 2.794905 0 2012
- 2.3698075 1 2017
- 2.527976 1 2015
- 2.794905 1 2012
- 2.794905 0 2012
- 2.685028 0 2013
- 2.794905 1 2012
- 2.794905 1 2012
- 2.527976 0 2015
- 2.3698075 1 2017
- 2.794905 1 2012
- 2.794905 1 2012
- 2.3698075 0 2017
- 2.527976 1 2015
- 2.794905 1 2012
- 2.3698075 0 2017
- 2.794905 1 2012
- 2.794905 0 2012
- 2.685028 0 2013
- 2.527976 0 2015
- 2.685028 0 2013
- end
- label values chengxiang chengxiang
- label def chengxiang 0 "Rural", modify
- label def chengxiang 1 "Urban", modify
------------------ copy up to and including the previous line ------------------