Hello everybody,
I am trying to reproduce the attached chart, meaning stacked bars of multiple categorical variables (socio-demographics) by a common categorical variable (cluster). It's easy to do each series with the following code:
But is it possible to add bars for multiple variables? I tried "graph common" as well as "grc1leg" using the "col(1)" option, but graph region sizes are different, as is label width, etc. Basically I would like to add stacked bars to the same graph region and separate them with a gap (like the attached image). Is it possible?
Thanks!!!
I am trying to reproduce the attached chart, meaning stacked bars of multiple categorical variables (socio-demographics) by a common categorical variable (cluster). It's easy to do each series with the following code:
Code:
graph hbar (count), over(cluster) over(male) percent stack asyvars
Thanks!!!
Comment