全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
14165 4
2016-04-26

yline() or xline() are typically used to add reference values:
. scatter yvar xvar, yline(10)
. scatter yvar year, xline(1944 1989)
To give the line in the first example the same look as used to draw an axis, we could specify
. scatter yvar xvar, yline(10, lstyle(foreground))
If we wanted to give the lines used in the second example the same look as used to draw grids,
we could specify
. scatter yvar year, xline(1944 1989, lstyle(grid))
added line options — Options for adding lines to twoway graphs 3
Interpretation of repeated options
Options yline() and xline() may be repeated, and each is executed separately. Thus different
styles can be used for different lines on the same graph:
. scatter yvar year, xline(1944) xline(1989, lwidth(3))
Reference
Cox, N. J. 2009. Stata tip 82: Grounds for grids on graphs. Stata Journal 9: 648–651.
来源:http://www.stata.com/manuals13/g-3added_line_options.pdf

Suppose that we wanted to place vertical lines for the previously mentioned holidays. We could
specify the dates in the tline() option as follows:
tsline calories, tline(28nov2002 25dec2002)

来源:http://www.stata.com/manuals13/tstsline.pdf#tstsline



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-4-27 12:53:31
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-1-9 13:16:57
多谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-25 16:46:34
感谢!~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2021-7-22 17:07:31
不错
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群