Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: graph twoway: double (nested) labels for time series?
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: graph twoway: double (nested) labels for time series?
Date
Thu, 7 Nov 2013 10:07:14 +0100
On Thu, Nov 7, 2013 at 6:45 AM, Andrew Lover wrote:
> I have a time series that I am plotting via -gr twoway- and would like
> to have a axis sub-label for year something like so:
>
>
> 13 26 39 52 13 26 39 52 13 26 39 52 13 26 39 52
> week
> 2010 | 2011 | 2012 | 2013 |
>
>
> There's (as always!) a helpful article by Nick Cox on a similar
> problem "Stata tip 55: Better axis labeling for time points and time
> intervals"
>
> http://www.stata-journal.com/sjpdf.html?articlenum=gr0030
Expanding on Nick's example:
*------------------ begin example ------------------
webuse turksales
line sales t, ///
xtick(119.5(4)159.5, tlength(*1.5)) ///
xmlabel(120/159, ///
noticks format(%tqq)) ///
xlabel(121.5(4)157.5, ///
noticks format(%tqCY) labgap(2.5)) ///
xtitle("")
*------------------- end example -------------------
* (For more on examples I sent to the Statalist see:
* http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany
http://www.maartenbuis.nl
---------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/