Hello,
I'm trying to combine two twoway plots with the same y axis. However, each plot has a different number of series on it and so the legends are different lengths. When I try to combine the two plots, the legends make it so that the graphs are scaled differently. Also, for readability, it's pretty important that the legends all be one column.

It looks a bit better if I fix the aspect ratio, but the graphs are still not lined up with each other.

(Ignore the fact that these graphs are completely meaningless; they illustrate my issue).
I'm looking for something like the last graph here, though this is coefplot not twoway.
Thanks for your help!
I'm trying to combine two twoway plots with the same y axis. However, each plot has a different number of series on it and so the legends are different lengths. When I try to combine the two plots, the legends make it so that the graphs are scaled differently. Also, for readability, it's pretty important that the legends all be one column.
Code:
sysuse auto, clear twoway scatter mpg rep78 headroom trunk price, name(fig1, replace) twoway scatter weight turn price, name(fig2, replace) graph combine fig1 fig2, xcommon ycommon
It looks a bit better if I fix the aspect ratio, but the graphs are still not lined up with each other.
Code:
twoway scatter mpg rep78 headroom trunk price, aspectratio(1) name(fig1, replace) twoway scatter gear_ratio turn price, aspectratio(1) name(fig2, replace) graph combine fig1 fig2, xcommon ycommon
(Ignore the fact that these graphs are completely meaningless; they illustrate my issue).
I'm looking for something like the last graph here, though this is coefplot not twoway.
Thanks for your help!
Comment