Hi all,

I am trying to create a panel graph of two histograms and a scatter using graph combine.

The example from stata is as follows.

Code:
sysuse lifeexp, clear
gen loggnp = log10(gnppc)

// Stata Example
scatter lexp loggnp, ysca(alt) xsca(alt) xlabel(, grid gmax)  saving(yx , replace)
twoway histogram lexp, fraction xsca(alt reverse) horiz fxsize(25) saving(hy, replace)
twoway histogram loggnp, fraction ysca(alt reverse) ylabel(0(.1).2, nogrid ) xlabel(,grid gmax) fysize(25) saving(hx, replace)

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") name(stata, replace)
Array


However, if you turn the ylabels through 90 Degrees this pushes the x axis out of alignment on the bottom figure.
I realise in this scenario its trivial to turn them back. However i have a negative value in my scatter, and only positve values on the histogram which induces the same effect.


Code:
scatter lexp loggnp, ysca(alt) xsca(alt) xlabel(, grid gmax) ylab(, angle(0)) saving(yx , replace)
twoway histogram lexp, fraction xsca(alt reverse) horiz fxsize(25) saving(hy, replace)
twoway histogram loggnp, fraction ysca(alt reverse) ylabel(0(.1).2, nogrid angle(0)) xlabel(,grid gmax) fysize(25) saving(hx, replace)

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")
Array


Does anyone know how to control the space occupied by the ylabels.

I have tried padding leading zeros to make all the numbers the same length. However, i also need to add "+" symbole to occupy the "-" symbol which is less than ideal.

Many thanks

Adrian