Hello Statalist community,
I could need a little help regarding the graph bar command. I'm running the following code to create my graph:
The graph this command creates looks like this: (I hope the scaling works. The graph looks huge in the preview)
What I need your help for is the following: If you look at the first two graphs, there's no yline at the 2,500 mark. At the third graph there is. Is there any command how I can force this line to be drawn? It drives me nuts that there are minor differences between these six graphs.
Btw, if you have any suggestions how I can make this graph look even better, please feel free to tell me your ideas. I'm glad to learn!
Thanks for your help guys, I really appreciate it!
Cheers
Jonas
I could need a little help regarding the graph bar command. I'm running the following code to create my graph:
Code:
gen n = 1 foreach var of varlist $p { local graphtitle: variable label `var' graph hbar (count) n, over(`var', relabel(1 SD 2 D 3 N 4 A 5 SA)) /// bar(1, fcolor(blue) lcolor(black)) /// title("`graphtitle'", size(small) color(black)) /// ytitle(" ") ylabel(0(500)2500) ymtick(0(100)2400) /// scheme(s1color) nodraw /// name(g_`var', replace) } graph combine g_p1 g_p2 g_p3 g_p4 g_p5 g_p6, /// title("Parents attitudes toward education") /// subtitle("SD='Strongly Disagree', D='Disagree', N='Neutral', A='Agree', SA='Strongly Agree'", /// size(vsmall) color(black)) /// b1title("Number of Respondents") /// scheme(s1color) /// name(combinedp, replace) graph export "${Graphs}/p_combined_w5.png", replace as(png) graph export "${Graphs}/p_combined_w5.ps", replace as(ps) mag(160) /// logo(off) orientation(landscape) drop n
What I need your help for is the following: If you look at the first two graphs, there's no yline at the 2,500 mark. At the third graph there is. Is there any command how I can force this line to be drawn? It drives me nuts that there are minor differences between these six graphs.
Btw, if you have any suggestions how I can make this graph look even better, please feel free to tell me your ideas. I'm glad to learn!
Thanks for your help guys, I really appreciate it!
Cheers
Jonas
Comment