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: RE: Added text with time format preserved in graph


From   "Radwin, David" <dradwin@rti.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Added text with time format preserved in graph
Date   Wed, 11 Dec 2013 19:43:32 -0500

Try this:

 	text(56.917 -111.30 "`: display %tc `r(min)''")

David
--
David Radwin, Senior Research Associate
Education and Workforce Development
RTI International
2150 Shattuck Ave. Suite 800, Berkeley, CA 94704
Phone: 510-665-8274

www.rti.org/education


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Thomas Speidel
> Sent: Wednesday, December 11, 2013 4:33 PM
> To: Statalist
> Subject: st: Added text with time format preserved in graph
> 
> I have the following loop to plot and save a different scatterplot for
> each value of `i':
> 
> ****************************************************
> # delimit ;
> forval i = 1/10	{;
> 	summ date if seq==`i', format;
> 	graph twoway scatter latid longit if seq==`i',
> 	text(56.917 -111.30 "`r(min)'")
> 	;
> };
> ****************************************************
> 
> I want the added text to reflect the time format of the variable it is
> referring to, which is %tc.
> Is there an option or a work around? Perhaps, somehow converting the
> date to a string?
> 
> --
> Thomas Speidel

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index