Stata画图——散点图与折线图

散点图

twoway (scatter yield time, sort msymbol(circle)) , 	///
       xtitle(Time) ylabel(0(.5)2.5) ytitle(Yield) 		///
	   title(Wheat Yield) 
graph save wawheat, replace

多条折线图

bys ifReturn year:egen if_DA=mean(DA) if ifReturn==1
bys ifReturn year:egen notif_DA=mean(DA) if ifReturn==0
twoway (connect if_DA year,sort symbol(D)) (connect notif_DA year,msymbol(+)), ytitle("DA") xtitle("年份")
twoway (connect company1 year ,msymbol(+)) (connect company2 year ,symbol(D)) (connect company3 year, symbol(D)), ///
title("Total Assets Scale(In Billion)") xlabel(1998(2)2018) xtick(1998(1)2018) ///
legend(ring(1) pos(5) cols(3)  label(1 "company1") label(2 "company2") label(3 "company3"))

散点图与折线图

twoway (scatter yield time, sort) 					///
       (line yhat3 time, sort lwidth(medthick)) , 	///
	   xtitle(Time) ytitle(Yield) ylabel(0(.5)2.5) 	///
	   title(Wheat Yield Fitted Cubic Model) 
graph save wheat_cubic_fit, replace
twoway (scatter wage educ, sort msize(small)) 						///
       (line yhatn educ, sort lwidth(medthick) lpattern(solid)) 	///
	   (line ub_wage educ, sort lcolor(forest_green) lwidth(medthick) ///
			lpattern(dash)) ///
	   (line lb_wage educ, sort lcolor(forest_green) lwidth(medthick) ///
			lpattern(dash))
graph save lwage_interval, replace
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值