Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: xline


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: xline
Date   Wed, 31 Jan 2007 08:52:52 -0500

Use in-line macro evaluation:

xline(`=d(5jan2007)')

Michael Blasnik


----- Original Message ----- From: "Eric G. Wruck" <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 31, 2007 8:43 AM
Subject: st: xline



I am working on a graph & want to insert vertical lines for various dates, time being the x-axis. It seems xline will not accept expressions or variable names, as I have tried, for example:

xline(d(5jan2007))

or

xline(scan1)

where scan1 was previously defined in the .do file with

gen scan1 = d(5jan2007)

The only way I get the thing to work is to have xline(17171), but I don't want to have to look up all the dates by hand. Does someone know an easier way to handle this?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index