I want to create a twoway histogram like the one here: https://stats.idre.ucla.edu/wp-conte.../02/histo3.png

I am comparing certified and non-certified teachers on a construct I have called "relationships." My code looks like this:
twoway (histogram relationship if altcert==1, frequency start(2) bin(3) color(green)) ///
(histogram relationship if altcert==0, frequency start(2) bin(3) ///
fcolor(none) lcolor(black)), legend(order(1 "alt cert" 2 "traditional" ))
The result is that I get a histogram that looks like this: https://imgur.com/a/lhTgn
I want 3 bins that are the same width for both groups. The first one being 2.00-2.74, the second 2.75-2.99, the third being 3-4.
I am comparing certified and non-certified teachers on a construct I have called "relationships." My code looks like this:
twoway (histogram relationship if altcert==1, frequency start(2) bin(3) color(green)) ///
(histogram relationship if altcert==0, frequency start(2) bin(3) ///
fcolor(none) lcolor(black)), legend(order(1 "alt cert" 2 "traditional" ))
The result is that I get a histogram that looks like this: https://imgur.com/a/lhTgn
I want 3 bins that are the same width for both groups. The first one being 2.00-2.74, the second 2.75-2.99, the third being 3-4.
Comment