Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Grid lines on top of shaded time series graph


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Grid lines on top of shaded time series graph
Date   Mon, 31 Oct 2011 08:34:53 +0000

Your calls to -twoway function- can also specify a -lcolor()- to give
sharper definition to the periods of recession.

Nick

2011/10/30 Jorge Eduardo Pérez Pérez <[email protected]>:

> 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?

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index