In the attached graph, x labels (2017m1 - 2020m1) are placed below the ticks. I wanted to move the position of x labels so that they are arranged between the ticks. Any advice would be appreciated.
Graph.gph
Graph.gph
clear set obs 36 set seed 314159 gen mdate = ym(2016, 12) + _n * format mdate %tm gen y = rnormal(2, 1) + 0.1 * mdate foreach y in 2016 2017 2018 2019 { if `y' > 2016 local mid = ym(`y', 6) + 0.5 local mids `mids' `mid' local end = ym(`y', 12) + 0.5 local ends `ends' `end' } levelsof mdate if inlist(month(dofm(mdate)), 1, 7), local(levels) line y mdate, xaxis(1,2) xla(`levels', axis(2) nogrid format(%tmMon)) xla(`mids', format(%tmCCYY) nogrid noticks axis(1)) xli(`ends', lp(solid) lw(thin) lc(gs12)) xtick(`ends', tlength(*3)) xtitle("", axis(1)) xtitle("", axis(2))
Comment