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!
Related Posts with Moving the bars of a graph
Get Post & Pre treatment yearsHello everyone, I am trying to make an event study graph. For this I need to pool my post and pre t…
Asdoc implementation problem Hello, i am relativ inexperienced in Stata and I wanted to incorporate my regression output into Wo…
mixed models, continuous variablesHi! I'm new on Stata and I apologize in advance for trivial questions I'm working on a mixed models…
Help with merging variablesHello, I'm trying to merge two datasets that have basically the same observations but with differen…
Adjusting for seasonality using sax12Dear Stata users, I'm working on a panel dataset, which two credit variables (basically two distinc…
Subscribe to:
Post Comments (Atom)
0 Response to Moving the bars of a graph
Post a Comment