I am trying to make a bar graph with different colors defined by an external variable (in this case region).
An example of the code I am using:
Could help me out with the following issues?:
- Adjusting the width of the bars: making them a bit bigger
- I used the scale option to get the overall graph smaller to have it more or less aligned with 12 font in word without having to rescale it too much there (no clue if this is the most efficient way)
- Aligning the bars with the state names (they seem to be misaligned at the moment, I guess this should be defined per group/region, but my trials are not succesful)
- Adjusting the width of the bars in the legend
- Adjusting the color schemes
Thank you for any help.
An example of the code I am using:
Code:
sysuse census, clear drop in 31/50 set scheme s1color separate medage, by(region) veryshortlabel sort medage graph bar (asis) medage?, over(state2, sort(medage) gap(0.1) rev) scale(0.6) plotregion(color(white)) graphregion(color(white))
- Adjusting the width of the bars: making them a bit bigger
- I used the scale option to get the overall graph smaller to have it more or less aligned with 12 font in word without having to rescale it too much there (no clue if this is the most efficient way)
- Aligning the bars with the state names (they seem to be misaligned at the moment, I guess this should be defined per group/region, but my trials are not succesful)
- Adjusting the width of the bars in the legend
- Adjusting the color schemes
Thank you for any help.