Hi, I am trying to plot graphs where the label of the y axis is horizontal. I am finding that, depending on the value of the range of the y axis, I sometimes get a very large empty margin on the left side of the graph.
The first twoway graph generated in the following code has this empty margin, and the second does not. This is despite including margin(zero).
How do I get rid of the margin on the left for example 1?
The first twoway graph generated in the following code has this empty margin, and the second does not. This is despite including margin(zero).
How do I get rid of the margin on the left for example 1?
Code:
clear input float(_b_ _min_ _max_ _year_) -.027993575 -.0550683 -.0009188477 2007 -.007819422 -.020521745 .004882903 2008 -.012764178 -.02672572 .0011973644 2009 0 . . 2010 -.02697954 -.05132534 -.002633733 2011 -.033307176 -.06746621 .0008518519 2012 -.028319916 -.064195335 .007555502 2013 -.008611818 -.07119201 .05396837 2014 -.03748605 -.10149958 .026527485 2015 end * ex. 1 tw ( rcap _min_ _max_ _year_ ) ( scatter _b_ _year_, m(o) c(l) lp(line) ), /// legend(off) xtitle("Year", size(large)) ytitle("") /// xlabel(2007(1)2015,angle(60) labsize(large)) /// ylabel(-0.15(0.05)0.05,labsize(large) angle(0)) /// yline(0, lcolor(black) lpattern(dash)) /// xline(2010, lcolor(black) lpattern(dash)) graphregion(color(white) margin(zero)) * ex. 2 tw ( rcap _min_ _max_ _year_ ) ( scatter _b_ _year_, m(o) c(l) lp(line) ), /// legend(off) xtitle("Year", size(large)) ytitle("") /// xlabel(2007(1)2015,angle(60) labsize(large)) /// ylabel(-0.1(0.05)0.05,labsize(large) angle(0)) /// yline(0, lcolor(black) lpattern(dash)) /// xline(2010, lcolor(black) lpattern(dash)) graphregion(color(white) margin(zero))
Comment