Combined Graphs

The combined graph takes separate graphs which are created with separate data sets and merges them.

The combined graph can be created using this code:

sysuse auto, clear
twoway__histogram_gen mpg , gen(h y, replace) freq bin(10)
twoway (histogram y [fw=h] if inrange(y,19,35), discrete lcolor(stc2) freq) (histogram y [fw=h],color(none) lcolor(stc2) discrete freq name(a1, replace))
twoway (histogram y [fw=h] if inrange(y,19,35),discrete lcolor(stc2) freq name(a2, replace))
graph combine a1 a2 ,xcommon cols(1)