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
Help with regression, binary independent variable with moderatorsDear all I'm fairly new with Stata and I have done my best to search for previous questions which a…
generating dummy variablesDear all, I have the following data coming from a lab experiment from multiple sessions. Under each…
reshape long to wide formatI am stuck at this point. I would like to transform input data (long format) to wide format (output …
Help on Writing out Regression Equation for Panel Data inc. Industry and Time DummiesHello, I'm trying to write out my regression equation inc. industry and time dummies, but I'm not s…
Timeseries - mean and variance equationshi, I am using a GARCH (1,1) regression model to regress stock returns against specific exogenous v…
Subscribe to:
Post Comments (Atom)
0 Response to bar graph over two variables: unable to adjust the color of bars
Post a Comment