FF NN
> I want to draw a somewhat tricky graph, at least for
> me. I have a variable "occu_before" recording people's
> occupations before some time, with the range coded
> from 1 to 9; and another variable "occu_after"
> recording people's occupations after some time, with
> the range coded from 1 to 9 as well.
> Now I want to make a bar graph, with the x axis being
> the "occu_before". Let's look at occu_before=1, then I
> want to draw the bar which counts how many people have
> the before-occupation of 1, plus, this bar is stacked
> by 9 small bars each of which, say, the ith, denotes
> how many people from the before-occupation 1 have the
> after-occupation i, so on and so forth.
Check out the user-written program -catplot- from SSC.
. ssc inst catplot
. whelp catplot
. catplot bar occu_before occu_after, asyvars stack legend(cols(3))
. catplot hbar occu_before occu_after, asyvars stack legend(cols(3))
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/