I am producing the plot below, using the code below. The title for the secondaty y-axis does not show. I think this is because of the name of the axis when working with by and two-way, but I can't find the reply in the documentation. I would appreciate any advice.
best,
Matías

best,
Matías
Code:
twoway (bar tot_inc wealth_quintile, barw(0.6) bfcolor(eltblue*0.5) blcolor(eltblue) ) /// (scatter share_207 wealth_quintile, msymbol(O) mcolor(erose) yaxis(2)) /// (line share_207 wealth_quintile, lcolor(erose) yaxis(2)) /// (scatter share_208 wealth_quintile, msymbol(O) mcolor(grey*0.2) yaxis(2)) /// (line share_208 wealth_quintile, lcolor(grey*0.2) yaxis(2)) /// (scatter share_pot_inc_wood_1 wealth_quintile, msymbol(O) mcolor(eltgreen) yaxis(2)) /// (line share_pot_inc_wood_1 wealth_quintile, lcolor(eltgreen) yaxis(2)), /// ytitle("Household average monthly expenditure" "(₦, thousand)") ytitle("% of household income", axis(2) orient(rvertical)) xtitle(Wealth decile) xlab(1(1)5) /// ylabel(0 "0" 500000 "500" 1000000 "1,000" 1500000 "1,500" 2000000 "2,000" 2500000 "2,500", axis(1) format(%12.0fc)) yscale(titlegap(*20)) /// ylabel(0 "0" 0.0002 "0.2" 0.0004 "0.4" 0.0006 "0.6" 0.0008 "0.8" 0.001 "1.0", axis(2) angle(horizontal)) /// legend(order(1 "Average income" 2 "Wood purch." 4 "Charcoal" 6 "Wood collected") region(lstyle(none)) size(small) col(4)) by(sector, note(""))
Comment