[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: graphing and shading
----- Original Message -----
From: "John D. Levendis" <email@example.com>
To: "statalist" <firstname.lastname@example.org>
Sent: Monday, June 02, 2003 9:28 PM
Subject: st: graphing and shading
> Hi everyone,
> I've got a quation regarding the new graphing facilities in STATA8.
> Lets say I've got some GDP data over time. Stata provides a means whereby
> demarcate a year using xline. Thus, I could show the great depression as
> area between two vertical lines:
> - twoway connected gdp time, xline(1929 1945)
> But lets say that I'd like to shade the area between two years (useful if
> want to have a bunch of intervals indicating time of recession. Is there a
> to do this in STATA?
A similar question came up last month. Gerald Wright (email@example.com)
came up with this example to show how it may be done:
gen c=`max' if date>q(1992q1)&date<q(2001q1)
lab var c "Clinton Years"
twoway (area c date, bcolor(gs15)) (line gnp date, clpattern(solid))
Hope this helps,
* For searches and help try: