' shade U.S. recessions identified by NBER
' for version 4
' last revised 10/27/2000 h

'include subroutine file
include sub_ShadeUSRecessions.prg

'change path to program path
%path = @runpath
cd "{%path}"

' create workfile											  
workfile tmp1 q 1948:1 1998:4

' fetch data from database
fetch(d=data_svar) rgnp unemp

' plot data
group g1 dlog(rgnp) unemp
freeze(graph1) g1.line

' set legend text
graph1.setelem(1) legend(Real GNP growth)
graph1.setelem(2) legend(Unemployment rate)

' dual scaling
graph1.setelem(2) axis(right)

' set frame size
graph1.options size(8,2)

' draw zero line
graph1.draw(dashline, left, rgb(172,172,172)) 0

' shade recessions
call shadeUSRecessions(graph1, 4)

show graph1
