Hi Community,
I am trying to specify a date range in my twoway graph (which uses locals), but despite my date range in the data being January 2015 - January 2021, the graph is scaled from 1960. I have played around with altering the graph directly with no luck. There is definitely no year<2015 in my data.
I thought the issue may be with my date formats, so have included my code used for this too.
Graph.gph 
Thanks in advance for any assistance!
I am trying to specify a date range in my twoway graph (which uses locals), but despite my date range in the data being January 2015 - January 2021, the graph is scaled from 1960. I have played around with altering the graph directly with no luck. There is definitely no year<2015 in my data.
I thought the issue may be with my date formats, so have included my code used for this too.
gen modate = ym(YEAR, MONTH)
format modate %tm
local naive_tests total_naive modate if TOWN == "Wonderland"
local target_tests total_target modate if CLINIC =="Fairy Clinic"
twoway mspline `naive_tests' || mspline `target_tests', ttitle("") ytitle("Test count") tlabel(2015m1(10)2021m1, format(%tm) labsize(small) angle() nogrid) ///
ylabel(, nogrid)
format modate %tm
local naive_tests total_naive modate if TOWN == "Wonderland"
local target_tests total_target modate if CLINIC =="Fairy Clinic"
twoway mspline `naive_tests' || mspline `target_tests', ttitle("") ytitle("Test count") tlabel(2015m1(10)2021m1, format(%tm) labsize(small) angle() nogrid) ///
ylabel(, nogrid)
Thanks in advance for any assistance!
Comment