Graph 使用eclplot时如何命名条形图?

Graph 使用eclplot时如何命名条形图?,graph,stata,Graph,Stata,我使用以下数据绘制具有置信限的估计值: clear input year beta ci5 ci95 pvalue 1999 0.390337619 -0.876345001 1.657020238 0.527644768 2001 -0.281463106 -1.14277483 0.579848618 0.503264501 2003 -0.753077604 -1.49646223 -0.009692978 0.047349224 2005 -0.295911126 -0.73

我使用以下数据绘制具有置信限的估计值:

clear

input year beta ci5 ci95 pvalue
1999  0.390337619 -0.876345001  1.657020238 0.527644768
2001 -0.281463106 -1.14277483   0.579848618 0.503264501
2003 -0.753077604 -1.49646223  -0.009692978 0.047349224
2005 -0.295911126 -0.735095768  0.143273516 0.175219436
2007  0.976340177  0.206120956  1.746559398 0.015560029
2010  0.080218534 -0.428463191  0.588900259 0.745605829
2012  0.021721372 -0.61379414   0.657236884 0.943868989
2014 -0.05203667  -0.658245394  0.554172054 0.859691155
end
我使用社区贡献的命令
eclplot
执行此操作,我运行的代码如下:

eclplot beta ci5 ci95 year, eplot(bar) estopts(barwidth(0.25)) title("Portfolio") ///
rplottype(  rspike) estopts2(bcolor(black)) ytitle("alpha (b.p.)") xtitle(" years") ///
yline(0,lstyle(foreground))  xline(2007, lcolor(blue))
如何将p值添加到相应条的上方


我还想为2007年画一条粗的参考线(浅灰色),以下是我的作品:

generate a = 2
generate b = round(pvalue, .001)

levelsof year, local(allyears) clean

eclplot beta ci5 ci95 year, eplot(bar) estopts(barwidth(0.25))  ///
title("Portfolio") rplottype( rspike) estopts2(bcolor(black)) ///
ytitle("alpha (b.p.)") xtitle("years") yline(0,lstyle(foreground)) ///
xline(2007, lcolor(gs9) lwidth(thick)) addplot(scatter a year, mlabel(b) ///
msymbol(i) mlabposition(6)) xlabel(`allyears')

以下是我的作品:

generate a = 2
generate b = round(pvalue, .001)

levelsof year, local(allyears) clean

eclplot beta ci5 ci95 year, eplot(bar) estopts(barwidth(0.25))  ///
title("Portfolio") rplottype( rspike) estopts2(bcolor(black)) ///
ytitle("alpha (b.p.)") xtitle("years") yline(0,lstyle(foreground)) ///
xline(2007, lcolor(gs9) lwidth(thick)) addplot(scatter a year, mlabel(b) ///
msymbol(i) mlabposition(6)) xlabel(`allyears')