Dear all,
here is my issue:
I have three variables, call them x, y and z, with x + y = z, for thirty observations (countries).
I would like to draw a bar graph which would show the structure of z, that is, I need stacked bars showing the respective percentages (shares) of x and y, and each bar's height is 100. x, y and z can all be negative.
Now, I would like the bars to be sorted from the leftmost to the rightmost by the numerical value of x - not its share (percentage), but its exact numerical value - from the lowest to the highest.
The problem is, when I submit
the bars get sorted by the percentage of x, and not its value.
Thank you.
Best,
Ivica
here is my issue:
I have three variables, call them x, y and z, with x + y = z, for thirty observations (countries).
I would like to draw a bar graph which would show the structure of z, that is, I need stacked bars showing the respective percentages (shares) of x and y, and each bar's height is 100. x, y and z can all be negative.
Now, I would like the bars to be sorted from the leftmost to the rightmost by the numerical value of x - not its share (percentage), but its exact numerical value - from the lowest to the highest.
The problem is, when I submit
Code:
graph bar (asis) x y, over(countryname, sort(1)) stack percentages
Thank you.
Best,
Ivica
Comment