Catplot Stata. The first named variable is innermost on the display. A twoway graph with catplot works like this.
Your data structure is unfriendly for what you want. Catplot is a wrapper for graph hbar default or graph bar or graph dot. Catplot shows frequencies or optionally fractions or percents of the categories of one two or three categorical variables.
Sysuse auto clear catplot rep78 foreign percent rep78 blabel bar preserve local np1 n 1 expand 2 replace rep78 6 in np1 l gen extra n np1 label def rep78 6 total label val rep78 rep78 catplot rep78 foreign percent rep78 extra blabel bar restore on some details.
Much of this code is just setting up a fake dataset. Let s use the auto data file for making some graphs. Sysuse auto clear catplot rep78 foreign percent rep78 blabel bar preserve local np1 n 1 expand 2 replace rep78 6 in np1 l gen extra n np1 label def rep78 6 total label val rep78 rep78 catplot rep78 foreign percent rep78 extra blabel bar restore on some details. An alternative is spineplot which i will perhaps explain at a later stage.