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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: formatting of a %td variable in over() in graphs


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: formatting of a %td variable in over() in graphs
Date   Fri, 9 Jul 2010 22:39:48 +0200

<>

You can always put the thing through the -string()- function beforehand,
though:

*************
sysuse auto, clear
keep in 1/10
gen day=18320+_n
form day %td
gen day2=string(day, "%td")
graph bar (mean) price, over(day2, label(angle(forty_five)))
*************


HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Airey, David C
Sent: Freitag, 9. Juli 2010 20:36
To: statalist@hsphsun2.harvard.edu
Subject: st: formatting of a %td variable in over() in graphs

.

If I do

scatter var1 var2

and var2 is formatted as %td date variable then var2 is labelled as
formatted.

If I do

graph box var1, over(var2)

or

dotplot var1, over(var2)

then var2 is not labelled as formatted.

There doesn't seem to be a way to get the %td formatted group variable to
use its formatting. One can relabel(# "text") manually, or one can use the
graph twoway command, but it seems like this should be an option to allow
the group variable formatting to be used.



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

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