Space efficient combination of three graphs with common x-axis in Stata
<p>I am looking for something like the following <code>by()</code> graph, but instead of three panels for three groups, I want three panels with three different y variables.</p>

<pre><code>webuse grunfeld, clear
keep if inrange(company, 1, 3)
twoway line mvalue year, by(company, cols(1) compact)
</code></pre>

<p>I like the compactness and one common x-axis for all three panels. Can I this with different y variables?</p>

<p>I can combine the following three panels with <code>graph combine</code>. But this duplicates the x-axis and wastes a lot of space that could be better spent on y range.</p>

<pre><code>webuse grunfeld, clear
keep if (company == 1)
tsline mvalue, name(mvalue, replace)
tsline kstock, name(kstock, replace)
tsline invest, name(invest, replace)
graph combine mvalue kstock invest, cols(1) name(combined, replace)
</code></pre>

<p>I started stripping away x-axis titles and labels, but this affects the relative sizes of each panel. Is there a more straightforward solution here? </p>

<pre><code>webuse grunfeld, clear
keep if (company == 1)
tsline mvalue, name(mvalue, replace) xtitle("") xlabel(none)
tsline kstock, name(kstock, replace) xtitle("") xlabel(none)
tsline invest, name(invest, replace)
graph combine mvalue kstock invest, cols(1) name(combined, replace)
</code></pre>