楼主: 阿袋
12950 4

[学习心得] 【独家发布】stata作图如何添加参考线 [推广有奖]

贵宾

院士

16%

还不是VIP/贵宾

-

TA的文库  其他...

各科好书新书

投资人生

论文写作投稿实战

威望
0
论坛币
568591 个
通用积分
150.3091
学术水平
304 点
热心指数
347 点
信用等级
246 点
经验
88776 点
帖子
1683
精华
5
在线时间
2895 小时
注册时间
2007-6-10
最后登录
2024-5-29

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

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



二维码

扫码加我 拉你入群

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

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

关键词:stata作图 Stata tata 参考线 Separately 如何

已有 1 人评分经验 收起 理由
Captain-CUI + 60 精彩帖子

总评分: 经验 + 60   查看全部评分

本帖被以下文库推荐

沙发
繁清 发表于 2016-4-27 12:53:31 |只看作者 |坛友微信交流群

使用道具

藤椅
楚天江南客 学生认证  发表于 2017-1-9 13:16:57 |只看作者 |坛友微信交流群
多谢!

使用道具

板凳
cuixingkong 发表于 2019-3-25 16:46:34 |只看作者 |坛友微信交流群
感谢!~

使用道具

报纸
yuandongping3 发表于 2021-7-22 17:07:31 |只看作者 |坛友微信交流群
不错

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-6-16 23:21