Hi, I would like to suppress the categorical axis labels in the right-hand graph in a by-graph like:
I've worked my way through the suboptions of the by-option, like noiylabel / noixlabel, but none of them works for categorical axes. What I typically do in such cases is to draw separate graphs and then combine them, suppressing the categorical axis in one of the original graphs. This gets me were I want, but it is still an awkward solution for many reasons. For the above toy example, this approach would entail, at a minimum,
This can get much more complicated for real-world graphs with many subgraphs. Does anyone know an easier / better solution than the above?
Best,
Daniel
Code:
. sysuse auto2 . graph dot price , by(foreign, row(1)) over(rep78) name(repeated, replace)
Code:
. insobs 2 . replace foreign=1 in -2/l . replace rep78=1 in -2 . replace rep78=2 in l . graph dot price if foreign==0, name(for0, replace) over(rep78) . graph dot price if foreign==1, name(for1, replace) graphregion(margin(r 20)) ylabel(0(2000)8000) over(rep78, label(nolabels)) . graph combine for0 for1 , row(1) name(fixed, replace)
This can get much more complicated for real-world graphs with many subgraphs. Does anyone know an easier / better solution than the above?
Best,
Daniel
Comment