Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65055

bars of bar chart misaligned when grouped by external variable

$
0
0
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:

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))
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.

Viewing all articles
Browse latest Browse all 65055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>