Dear all,
I am writing here because I need some help to fine tune a graph's aesthetics.
My graph uses two y-axes which have different scales. On the LHS I use a 0(.5)2.5 scale regarding a bar chart, while on the RHS I use a 0(.2)1 concerning a scatterplot, the latter being superimposed to the bar chart.
The two y-axes have the same number of ticks. However, they are not perfectly aligned in that, when I use grid lines for the LHS y-axis, they do not correspond (although slightly, yet visibly) with the RHS y-axis ticks.
Here's the code I am using: twoway bar avg_GH n_country, barw(.7) color(emidblue) xlabel( ang(45) labsize(vsmall)) xtitle("") ytitle("titleLHS" , size(small) axis(1)) yscale(titlegap(3) axis(1)) yla(0(.5)2.5, axis(1)) yaxis(1) ///
|| scatter avg_PH avg_MH n_country, msymbol(O D) msize(small small) yscale(titlegap(3) axis(2)) yla(0(.2)1, axis(2)) yaxis(2) ytitle("titleRHS", size(small) axis(2)) legend(rows(1) order(1 2 3)).
Any ideas on how to fix this would be greatly appreciated. Thanks in advance!
I am writing here because I need some help to fine tune a graph's aesthetics.
My graph uses two y-axes which have different scales. On the LHS I use a 0(.5)2.5 scale regarding a bar chart, while on the RHS I use a 0(.2)1 concerning a scatterplot, the latter being superimposed to the bar chart.
The two y-axes have the same number of ticks. However, they are not perfectly aligned in that, when I use grid lines for the LHS y-axis, they do not correspond (although slightly, yet visibly) with the RHS y-axis ticks.
Here's the code I am using: twoway bar avg_GH n_country, barw(.7) color(emidblue) xlabel( ang(45) labsize(vsmall)) xtitle("") ytitle("titleLHS" , size(small) axis(1)) yscale(titlegap(3) axis(1)) yla(0(.5)2.5, axis(1)) yaxis(1) ///
|| scatter avg_PH avg_MH n_country, msymbol(O D) msize(small small) yscale(titlegap(3) axis(2)) yla(0(.2)1, axis(2)) yaxis(2) ytitle("titleRHS", size(small) axis(2)) legend(rows(1) order(1 2 3)).
Any ideas on how to fix this would be greatly appreciated. Thanks in advance!
Comment