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]

st: Adding Shaded Areas to Time Series Graph


From   [email protected]
To   [email protected]
Subject   st: Adding Shaded Areas to Time Series Graph
Date   Thu, 09 Feb 2012 09:03:15 -0600

Hello.

I've been trying to get the following code to work using the latest version of Stata 10 on Mac OS X. I have the following problems:

First, each area plot is displayed only as a line at the end of the specified range rather than the area itself.

Second, the tlabel option on the last line works fine, but what I really want for the t-axis option is tlabel(2000m1(12)2008m1, format(%tm!2!0YY) labsize(small)). Unfortunately, Stata says that 2000m1 is an invalid name and I don't understand why.

set scheme lean1
tsset service_date_month, monthly
twoway function y=0.3, range(epiccare_start epiccare_end) recast(area) color(gs12) 	|| 	///
function y=0.3, range(reg_bill_start reg_bill_end) recast(area) color(gs12) 			|| 	///
tsline GIM_99201 if tin(2002m5, 2007m8), 										///
title("CPT Code 99201 Trend" "May 2002 - August 2007" 							///
"General Internal Medicine", size(medium)) 										///
subtitle("") 																///
ytitle("Proportion") 															///
xtitle("Year") 																///
ylabel(0(0.1)0.3, labsize(small)) 												///
legend(off) 																///
lpattern(solid) 																///
tlabel(, format(%tm!2!0YY) labsize(small))

Any help would be greatly appreciated.

Scott J. Briggs




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