Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: time series plot with shaded bands


From   "MA V" <[email protected]>
To   [email protected]
Subject   RE: st: RE: time series plot with shaded bands
Date   Thu, 29 Mar 2007 21:16:02 +0000

thanks so much! this is perfect.
Best,
MA


From: Maarten buis <[email protected]>
Reply-To: [email protected]
To: [email protected]
Subject: RE: st: RE: time series plot with shaded bands
Date: Thu, 29 Mar 2007 21:35:59 +0100 (BST)

--- MA V <[email protected]> wrote:
> I have the following toy dataset:
> +------------+
> | year qty |
> |------------|
> 1. | 1997 23 |
> 2. | 1998 28 |
> 3. | 1999 35 |
> 4. | 2000 15 |
> +------------+
>
> and I want the shaded bands to go from feb97 to dec97 and feb1999 to
> july1999.

*--------- begin example -----------
clear
input year qty
1997 23
1998 28
1999 35
2000 15
end
tsset year, yearly
twoway function year = 40, /*
*/ range(1997.03333 1997.91666667) /*
*/ color(gs12) recast(area) || /*
*/ function year = 40, /*
*/ range(1999.03333 1999.5) /*
*/ color(gs12) recast(area) || /*
*/ tsline qty, clstyle(solid)
*---------- end example -------------

(For more on how to use examples I sent to the Statalist, see :
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

Hope this helps,
Maarten



-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------



___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
_________________________________________________________________
Live Search Maps � find all the local information you need, right when you need it. http://maps.live.com/?icid=hmtag2&FORM=MGAC01

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index