im trying to combine to graphs and adding different titles to each one in the combined graph.
My problem is, that I also need the single/uncombined graphs without titles.
So here is my code:
Code:
foreach v of varlist married { forval sex=0/1{ preserve collapse (mean) `v'_orig `v', by (age sex) tw (lin `v'_orig age if sex==`sex', sort lcolor(black) lpattern(solid)) (lin `v' age if sex==`sex', sort lcolor(black) lpattern(dash)), /// xtitle (Age) ytitle(Share of married individuals) scheme(s1mono) legend(order(1 "before simulation" 2 "after simulation")) name(`v'_g`sex', replace) graph save "${graphs}`v'_g`sex'", replace graph export "${graphs}`v'_g`sex'", replace restore } grc1leg `v'_g1 `v'_g0, /// 2er Grafik xcommon ycommon graphregion(color(white)) t1title(women) t2title(men) /// graph save "${graphs}`v'_g`sex'_combined", replace graph export "${graphs}`v'_g`sex'_combined", replace }
Code:
grc1leg `v'_g1 `v'_g0, /// 2er Grafik xcommon ycommon graphregion(color(white)) t1title(women) t2title(men)
How can I solve this problem?
Thank you very much for your help.
0 Response to Title for graph
Post a Comment