Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: area between reference lines


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: Re: area between reference lines
Date   Thu, 6 Nov 2008 00:24:28 +0100

Line for the server...

**********
sysuse uslifeexp, clear

*plain vanilla
tw (line le year, xli(1970 1980)) (area le year if year>=1970 & year<=1980), name(first, replace) legend(off)

*or quick and dirty tricks if you want color up the upper edge of the graph
tempvar aux
g `aux'=80
tw (line le year, xli(1970 1980)) (area `aux' year if year>=1970 & year<=1980), name(second, replace) legend(off)

*let`s see both
gr combine first second
*********

HTH
Martin
_______________________
----- Original Message ----- From: "Robert Duval" <[email protected]>
To: <[email protected]>
Sent: Thursday, November 06, 2008 12:07 AM
Subject: st: area between reference lines


Dear all,

Does anyone knows how to fill the background area between two
(vertical) reference lines in a twoway line graph?

The idea is to shade the background of a specific (vertical) region of
the graph to indicate that during those years (x axis) the economy was
in a recession.

Any help will be greatly appreciated
robert
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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