Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Grid lines on top of shaded time series graph

From   Jorge Eduardo Pérez Pérez <>
To   statalist <>
Subject   st: Grid lines on top of shaded time series graph
Date   Sun, 30 Oct 2011 17:07:11 -0400

Dear Statalist

I have been creating time series graphs for several countries with
recession shading, following the code on the user written command
-nbercycles- by Christopher Baum.

Following a example from -nbercycles-

ssc install freduse, replace
freduse MPRIME, clear
gen ym = mofd(daten)
tsset ym, monthly
twoway function y=20.705,range(119 130) recast(area) color(gs15)
base(4.7025) || ///
function y=20.705,range(166 182) recast(area) color(gs15) base(4.7025) || ///
function y=20.705,range(240 246) recast(area) color(gs15) base(4.7025) || ///
function y=20.705,range(258 274) recast(area) color(gs15) base(4.7025) || ///
tsline MPRIME if tin(1970m1,1990m1), xlabel(,format(%tm))
legend(order(5 1 "Recession")) tlabel(,grid)

I would like the horizontal and vertical grid lines on the graph to be
on top of the shading. Does anyone know how to do this?

Thank you,
Jorge Eduardo Pérez Pérez

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index