I am generating a number of scatter plots using the following code:
#delimit ;
forvalues i = 1/10 {;
local t : label regioncodesgtd `i';
graph twoway (scatter nkill v2x_libdem if region==`i', msymbol(oh) mcolor(gs9))
(lfit nkill v2x_libdem if region==`i', lwidth(thin) lcolor(gold) lpattern(dash)),
title("`t'")
ytitle("Numbers Killed by Terrorism")
xtitle("Liberal Democracy Score")
xscale(range(0 (.1) 1))
legend(col(1) ring(0) position(11) order(2 3)
region (lcolor(black))
forces)
graphregion(color(white))
name(graph1, replace);
graph save graf`i', replace;};
graph combine graf1.gph graf2.gph graf3.gph graf4.gph graf5.gph graf6.gph
graf7.gph graf8.gph graf9.gph graf10.gph, note("Sources: V-Dem and GTD");
graph save RegionalLiberalDemocracyGraph, replace;
#delimit cr
When they come out, however, the x axis does not have intervals marked all the way from 0 to 1 in some cases. This happens when the values that v2x_libdem takes on do not go all the way from 0 to 1. So, for instance, when i=5, the x axis intervals stop at .5. Is there any modification that will extend them all the way to 1? I tried with the xscale option, but to no avail.
Thanks,
Julian
#delimit ;
forvalues i = 1/10 {;
local t : label regioncodesgtd `i';
graph twoway (scatter nkill v2x_libdem if region==`i', msymbol(oh) mcolor(gs9))
(lfit nkill v2x_libdem if region==`i', lwidth(thin) lcolor(gold) lpattern(dash)),
title("`t'")
ytitle("Numbers Killed by Terrorism")
xtitle("Liberal Democracy Score")
xscale(range(0 (.1) 1))
legend(col(1) ring(0) position(11) order(2 3)
region (lcolor(black))
forces)
graphregion(color(white))
name(graph1, replace);
graph save graf`i', replace;};
graph combine graf1.gph graf2.gph graf3.gph graf4.gph graf5.gph graf6.gph
graf7.gph graf8.gph graf9.gph graf10.gph, note("Sources: V-Dem and GTD");
graph save RegionalLiberalDemocracyGraph, replace;
#delimit cr
When they come out, however, the x axis does not have intervals marked all the way from 0 to 1 in some cases. This happens when the values that v2x_libdem takes on do not go all the way from 0 to 1. So, for instance, when i=5, the x axis intervals stop at .5. Is there any modification that will extend them all the way to 1? I tried with the xscale option, but to no avail.
Thanks,
Julian