全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1039 1
2018-12-04
新手第一次作图,感觉非常垃圾……codes格外多,图也很不简洁美观。这个图的x轴是时间,y轴是死亡率,每个点是一个国家,然后我想看各个地区死亡率随年份的改变。

Codes在这里,求狠拍:
  twoway (scatter infant_mortality cohort if geo=="Europe and Central Asia",msize(small)) ///
  (scatter infant_mortality cohort if geo=="East, South and South-East Asia",msize(small)) ///
  (scatter infant_mortality cohort if geo=="Sub-Saharan Africa",msize(small))///
  (scatter infant_mortality cohort if geo=="Latin America and the Caribbean",msize(small)) ///
  (scatter infant_mortality cohort if geo=="Middle East and North Africa",msize(small))///
  (lfit infant_mortality cohort if geo=="Europe and Central Asia") ///
  (lfit infant_mortality cohort if geo=="East, South and South-East Asia") ///
  (lfit infant_mortality cohort if geo=="Sub-Saharan Africa")///
  (lfit infant_mortality cohort if geo=="Latin America and the Caribbean") ///
  (lfit infant_mortality cohort if geo=="Middle East and North Africa"),///
  title("Infant Mortality by geographical regions") ///
   xtitle("Year") ///
   ytitle("Infant Mortality") ylabel(, angle(0)) ///   
  legend(label(1 "Europe and Central Asia") ///
  label(2 "East, South and South-East Asia") ///
  label(3 "Sub-Saharan Africa") ///
  label(4 "Latin America and the Caribbean") ///
  label(5 "Middle East and North Africa")///
  label(6 "Fitted Value,Europe and Central Asia")///
  label(7 "Fitted Value,East, South and South-East Asia")///
  label(8 "Fitted Value,Sub-Saharan Africa")///
  label(9 "Fitted Value,Latin America and the Caribbean") ///
  label(10 "Fitted Value,Middle East and North Africa")///
  size(small))///
  graphregion(fcolor(white))
Graph.jpg


附件列表
Graph.jpg

原图尺寸 473.21 KB

Graph.jpg

cohorts_3.dta

大小:584.75 KB

 马上下载

二维码

扫码加我 拉你入群

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

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

全部回复
2018-12-4 11:23:44
丑的自己都看不下去了……

作图的目的是对比世界不同地区 死亡率随时间的变化。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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