Hi statalist,
I'm seeking your advice on how to label the axes. My code below produced the following chart.

Now then… ideally, I want the y-axis to be labeled the same as the value label of 'ind'. I know that this can be done manually, as shown in the code below:
Is there a smarter or faster way to label the axis? For your information, 'ind' is already labeled.
Thank you!
I'm seeking your advice on how to label the axes. My code below produced the following chart.
Code:
graph twoway (bar beta ind if gru==1 & dep==1 & ind!=0, horizontal barw(0.5)) /// (rcap mxci mnci ind if gru==1 & dep==1 & ind!=0, horizontal col(gs4)) /// (scatter ind beta if gru==1 & dep==1 & ind!=0, ms(none) mlab(lbel) mlabcol(gs4) mlabpos(7))
Now then… ideally, I want the y-axis to be labeled the same as the value label of 'ind'. I know that this can be done manually, as shown in the code below:
Code:
ylab(1 "I can't" 2 "get my" 3 "head" 4 "around it", noticks angle())
Code:
gen ind = . replace ind = 0 if missing(cate) replace ind = 1 if cate==0 & ctrl=="ctrl2" replace ind = 2 if cate==1 & ctrl=="ctrl2" replace ind = 3 if cate==2 & ctrl=="ctrl2" replace ind = 4 if cate==3 & ctrl=="ctrl2" replace ind = 5 if cate==4 & ctrl=="ctrl2" replace ind = 6 if cate==0 & ctrl=="ctrl4" replace ind = 7 if cate==1 & ctrl=="ctrl4" replace ind = 8 if cate==2 & ctrl=="ctrl4" replace ind = 9 if cate==3 & ctrl=="ctrl4" replace ind = 10 if cate==4 & ctrl=="ctrl4" lab def ind /// 0 "All firms" /// 1 "All firms (controlling VAL)" /// 2 "L VAL" /// 3 "LM VAL" /// 4 "UM VAL" /// 5 "H Val" /// 6 "All firms (controlling VA)" /// 7 "L VA" /// 8 "LM VA" /// 9 "UM VA" /// 10 "H VA" /// , replace lab val ind ind
Comment