你好,楼主,能否帮我看下我的程序,我也是照着英文手册改写,但是,就是运行不起来,应该是命令过长,断句语法出了点问题,twoway bar 的 option 命令太长,逐条运行,只能运行到分割线以上,老提示错误“unrecognized command: ylabel " "unrecognized command: , invalid command name"
望指点迷津,谢谢
program name /* (注释)文件名为name */
version 11.0
set more off
log using agesex, replace
cd d:/mydata/cw
use age_sex.dta
#delimit ;
twoway bar male agegroup, horizontal || bar female agegroup, horizontal;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
,ylabel(1(1)9, angle(horizontal) valuelabel labsize(*.8));
xtitle("Population") ytitle("");
xlabel(-60 "60" -50 "50" -40 "40" -30 "30" -20 "20" -10 "10" 10 20 30 40 50 60)
legend(label(1 Males) label(2 Females))
title(" Male and Female Population by Age")
subtitle("Year 2012")
note("Source: CDC ")
#delimit cr
graph save agesex
log off
end