Dear all,
I am running a code for a stacked graph bar for which I would like to show the data values above the bars. I used the option blabel(total). Is there a way to make only the total cumulative value of of each bar show up (sum of both stacked bars for each xlabel)? I am not interested in the data value labels for the dark blue bars.
The code I used to get the graph below was:
I am running a code for a stacked graph bar for which I would like to show the data values above the bars. I used the option blabel(total). Is there a way to make only the total cumulative value of of each bar show up (sum of both stacked bars for each xlabel)? I am not interested in the data value labels for the dark blue bars.
The code I used to get the graph below was:
Code:
graph bar percap_gov percap_pri if year==2015 & selection==1, stack /// over(location, label(angle(90) labsize(small)) sort(percap_total) descending) /// ytitle("") yscale(off) blabel(total, orientation(vertical) size(small) format(%9.0f)) nofill /// ysize(9) xsize(18) graphregion(color(white)) ylab(, nogrid) /// legend(label(1 "Government") label(2 "Private Sector + DAH") pos(1) col(1) ring(0) size(small) region(c(none))) /// bar(1, bcolor(blue*1.3)) bar(2, bcolor(blue*0.1))
Comment