Dear Statalists,
I am plotting my estimated coefficients and its confidence intervals. But I found that two graphs using the same code produce different margins in the graph. So when I combine them together using "gr combine" or "gr1leg2", the result is not so neat.
The code for generating the graphs is :
As you can see from the following picture, the the right-hand-side graph has larger margin on the left.

The following is the result when I combine them together using code:

It is clearer that the right-hand-side graph has smaller width. It is a bit ugly...
When using "gr combine qpct.gph qpcg.gph ,ycommon", the graph does not have such problem. But I don't want to use the same y axis for all graphs because on some occasions, the magnitudes of the two graphs can be very different.
Is there anything I can do to adjust the margin or fix it?
Thanks a lot!
Kailin
Update: I found that not including "ylabel(, angle(horizontal))" command can also solve the problem. But I would like to have horizontal y labels and natural margins at the same time. So any suggestions would be appreciated!
I am plotting my estimated coefficients and its confidence intervals. But I found that two graphs using the same code produce different margins in the graph. So when I combine them together using "gr combine" or "gr1leg2", the result is not so neat.
The code for generating the graphs is :
Code:
twoway ///
(scatter estimate parmid, mcolor(black)) /// dot for group 1
(rcap min95 max95 parmid, vert color(black)), xtitle("") /// code for 95% CI
graphregion(color(white)) yline(0,lp(dash) lcolor(black)) title("`title'") ///
ylabel(, angle(horizontal)) ///
legend(label(1 "Coefficient") label(2 "Lower / Upper 95% CI") size(small))
The following is the result when I combine them together using code:
Code:
gr combine qpct.gph qpcg.gph
It is clearer that the right-hand-side graph has smaller width. It is a bit ugly...
When using "gr combine qpct.gph qpcg.gph ,ycommon", the graph does not have such problem. But I don't want to use the same y axis for all graphs because on some occasions, the magnitudes of the two graphs can be very different.
Is there anything I can do to adjust the margin or fix it?
Thanks a lot!
Kailin
Update: I found that not including "ylabel(, angle(horizontal))" command can also solve the problem. But I would like to have horizontal y labels and natural margins at the same time. So any suggestions would be appreciated!

Comment