Hi experts;
I am plotting a bar graph that has two variables. My code looks like below:
#delimit ;
graph bar y_var, over(x_var1, relabel(1 "1" 2 "2" 3 "3" 4 "4") label(labsize(vsmall) alternate) gap (5)) over(x_var2, gap(100))
bar(1, col(gs4))
bar(2, col(gs8))
bar(3, col(gs12))
bar(4, col(gs16))
{other options}
;
#delimit cr
The issue is that the "bar" commands don't work when you have two variables over which you are sketching your plot. Any experience how I can fix the colours?
Thank you
Related Posts with bar graph over two variables: unable to adjust the color of bars
Creating dummies in a rolling window of the past 5 yearsDear all, I have an unbalanced, multi-level panel data. I am struggling to create dummy variables …
mi impute - irr option not working after my commandHi all, I am using the Code: mi impute/mi estimate: command to try and estimate a multilevel poiss…
icc after gsemHello, I am trying to fit a mediated gsem multilevel model, in 2 levels. I would like to obtain the …
How can I Export Nested Probit Analysis Results to Word document?Hi all, I ran probit and margin with Stata 14.2 for six different years. I used the esttab command …
Interacting dummy variable for missing value in continuous variablehi I am trying to run a linear regression where some of the values in one of the independent variab…
Subscribe to:
Post Comments (Atom)
0 Response to bar graph over two variables: unable to adjust the color of bars
Post a Comment