Hello,
I have 5 graphs that I am combining into one as in the picture below. I would like to have the x-axis visually aligned, but I haven’t figured out a way to do so. Does anyone have a suggestion for code to do this? I am using Stata 18.
This is a sample of my code for each of the 5 graphs (the only things that change from one graph to another are the title and xlabels; all other options are the same):
This is my code used to create the combined one:

I have 5 graphs that I am combining into one as in the picture below. I would like to have the x-axis visually aligned, but I haven’t figured out a way to do so. Does anyone have a suggestion for code to do this? I am using Stata 18.
This is a sample of my code for each of the 5 graphs (the only things that change from one graph to another are the title and xlabels; all other options are the same):
Code:
marginsplot, recast(bar) ylabel(0(0.2)0.6) title("") ylabel(, nogrid) xlab(, nogrid) ytitle(Pr(needs)) plotopts(barw(1.0) fcolor("gray") lcolor("black")) ysize(7) xsize(12) aspect(2) ciopts(lcolor(black)) xtitle("", color(black)) xlabel(1 "White" 2 "Black" 3 "Hispanic" 4 "Other", valuelabel angle(45) labsize(vsmall)) title("Race and Ethnicity", nospan size(medsmall) color(black))
Code:
graph combine 1.gph 2.gph 3.gph 4.gph 5.gph, ycommon rows(1) ysize(7) xsize(12)
Comment