lixuewei3 发表于 2015-4-16 21:22 
graph combine happiness[spousehappiness]
happiness[spousehappiness] is not a memory graph
r(198) ...
. sysuse lifeexp, clear
. gen loggnp = log10(gnppc)
. label var loggnp "Log base 10 of GNP per capita"
. scatter lexp loggnp,
ysca(alt) xsca(alt)
xlabel(, grid gmax) saving(yx)
. twoway histogram lexp, fraction
xsca(alt reverse) horiz saving(hy)
. twoway histogram loggnp, fraction
ysca(alt reverse)
ylabel(,nogrid)
xlabel(,grid gmax) saving(hx)
. graph combine hy.gph yx.gph hx.gph,
hole(3)
imargin(0 0 0 0) graphregion(margin(l=22 r=22))
title("Life expectancy at birth vs. GNP per capita")
note("Source: 1998 data from The World Bank Group")
例子你看看