Hi all,
I would like to add the "%" percentage sign to the bar labels in this hbar graph. I know how to do this in a twoway graph (which has been discussed in this post), but I cannot figure out if this is possible with an hbar? A sample graph I am working with is below (I have data an at individual level, but have collapsed it into averages before creating the graph). Thanks a lot in advance!
I would like to add the "%" percentage sign to the bar labels in this hbar graph. I know how to do this in a twoway graph (which has been discussed in this post), but I cannot figure out if this is possible with an hbar? A sample graph I am working with is below (I have data an at individual level, but have collapsed it into averages before creating the graph). Thanks a lot in advance!
Code:
clear input byte char float(var_1 var_2 var_3 var_4) 8 .33 .47 .13 .05 9 .41 .51 .06 .01 end graph hbar var_1 var_2 var_3 var_4, over(char, sort(1) descending relabel(1 "Example label 1" 2 "Example label 2") axis(outergap(*30))) percent stack ylab(,labsize(small)) ytitle("") blabel(bar, size(small) color(white) position(center) format(%4.0f)) legend(order(1 "Strongly agree" 2 "Agree" 3 "Disagree" 4 "Strongly disagree") rows(1) position(6) size(small)) xsize(6) ysize(3)
Comment