Hi. I am trying to make the following two changes to the attached graph:
1) I want to make my x-axis labels appear on two lines/levels so as to avoid the mess in the attached graph. I'd like the terms "Mandate" and "Platform" at the dashed, red lines to appear closest to the x-axis and the years to appear at a level/line below.
2) the shading appears to remove the graph boundary line on top. How do I prevent this from happening? Is there any way I can set a y-axis limit to the height of the shading?
I'd appreciate any help in doing this. I've been spinning my wheels for quite a while on this.
1) I want to make my x-axis labels appear on two lines/levels so as to avoid the mess in the attached graph. I'd like the terms "Mandate" and "Platform" at the dashed, red lines to appear closest to the x-axis and the years to appear at a level/line below.
2) the shading appears to remove the graph boundary line on top. How do I prevent this from happening? Is there any way I can set a y-axis limit to the height of the shading?
I'd appreciate any help in doing this. I've been spinning my wheels for quite a while on this.
Code:
set scheme s1color
su year, meanonly
local first = r(min)
local last = r(max)
forval y = `first'/`last' {
su mdate if year == `y', meanonly
local labelcall `labelcall' `r(mean)' "`y'"
local tickpos = r(max) + 0.5
if `y' < `last' local tickcall `tickcall' `tickpos'
}
mac li
scatter one mdate, ///
ytitle("Number of teleconsults") yscale(range(0 .)) ylabel(#6, nogrid labsize(vsmall) ///
angle(horizontal)) mc(black) msize(vsmall) ///
xline(764.5, lwidth(16.1) lcolor(gs15)) ///
xline(771.4, lwidth(15.85) lcolor(gs13)) ///
xline(761 768, lpattern(dash) lcol("cranberry")) ///
xla(`labelcall' 761 "Mandate" 768 "Platform", noticks labsize(vsmall) nogrid) ///
xtick(`tickcall', tlength(*1)) ///
xtitle("Year" "", height(6)) graphregion(fcolor(white))

Comment