Hi,
I am trying to do a bar graph using the following codes:
* E.1 Question?
#delimit;
graph bar (count) [pw=fexp], asyvars percentage over(e1) over(arauc) graphregion(color(white)) bgcolor(white) bargap(25) blabel(group) ysize(5.0) xsize(7.0)
//legend(label(1 "Sí") label(2 "No") label(3 "No responde") label(4 "No sabe"))
//ylabel(#5, angle(0) nogrid labsize(small))
ylabel( 0 "0%" 20 "20%" 40 "40%" 60 "60%" 80 "80%" 100 "100%", nogrid labsize(small) angle(horizontal)) title("")
yscale(range(0 100) noextend)
ytitle("")
//ytitle("%", orientation(horizontal))
title("Have you cycled?", span color(black))
//subtitle("Percent of respondents")
note("Source: XX.")
blabel(bar, position(outside) format(%9.1f) color(black)) ;
#delimit cr
And this is the result I get:
Array
However the problem is that I want to have the two "blue categories" together and then the two "red categories", so the results would be like:
81.1 - 76.3 --------- 18.9 - 23.7
I have tried changing the order of the over options to:
graph bar (count) [pw=fexp], asyvars percentage over(arauc) over(e1) graphregion(color(white)) bgcolor(white) bargap(25) blabel(group) ysize(5.0) xsize(7.0)
But the problem is that the result I get is clearly not the one I want:
Array
Can you help me, please? Thank you!
0 Response to Moving the bars of a graph
Post a Comment