How to change the order of groups in catplot..., by() over()
Dear all, I am trying to create a bargraph with two layers of categories(groups) using catplot. I would like to arrange my graph in a specified order. For example, . sysuse auto, clear . catplot rep78, by(foreign) percent(foreign) recast(bar) over(class) The graph is ordered in "Domestic" "Foreign".
Can anyone point me toward a command to change the order as by "Foreign""Domestic" ?
I can already change the order of the categories by creating a new order variable associated with the values of my category variable and use var1opts(sort(order)). But in my original data, I have two layers of categories so I have both "by()" and "over()" in my command. I can only specify the order of variables in the "over()" but not in "by()". Can you help? THanks a lot! Best regards,
Deniel
0 Response to How to change the order of groups in catplot..., by() over()
Post a Comment