Hello everybody,
I was practicing again the graphical part of STATA and I wanted to know if it is possible to do what appears on the x-axis (attached image).
The most I have been able to do is that instead of showing the quarters only the year appears, but I don't know how to make the quarter appear with a letter like the one in the image and the year below the quarters.
I hope I have explained.
As always, thanking you in advance for your valuable comments.
I was practicing again the graphical part of STATA and I wanted to know if it is possible to do what appears on the x-axis (attached image).
The most I have been able to do is that instead of showing the quarters only the year appears, but I don't know how to make the quarter appear with a letter like the one in the image and the year below the quarters.
I hope I have explained.
As always, thanking you in advance for your valuable comments.
Code:
clear input int date float gnp96 28 3631.6 29 3644.5 30 3672 31 3703.1 32 3757.5 33 3818.3 34 3841.6 35 3861.8 36 3906.8 37 3915 38 3937.8 39 3922.9 40 3922 41 3922.3 42 3961.3 43 3931 44 4027.3 45 4042 46 4064.7 47 4072.9 end format %tq date gen datestring = string(date,"%tq") gen qtly=substr(datestring,6,1) gen trim="I" if qtly=="1" replace trim="II" if qtly=="2" replace trim="III" if qtly=="3" replace trim="IV" if qtly=="4" local start1 = yq(1967,1) local end1 = yq(1971,4) local start2 = yq(1967,3) local end2 = yq(1971,3) #delimit ; tsset date; tsline gnp96, xticks(`start1' (4) `end1', tlength(*0)) xlabel(`start2' (4) `end2', noticks format(%tqCY)) ; #delimit cr
Comment