Statalist


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

st: RE: Re: Controlling display format for -addlabel- option on -histogram-


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: Controlling display format for -addlabel- option on -histogram-
Date   Mon, 11 Feb 2008 15:28:41 -0000

Well spotted. Knowing the answer allows also a determination that Jeff
Pitblado explained this in 2003. 

http://www.stata.co.uk/statalist/archive/2003-12/msg00108.html

Nick 
n.j.cox@durham.ac.uk 

Michael Blasnik..

You can use the slightly documented (see help histogram, last sentence
under Bar 
labels section) option addlabopts with the yvarformat suboption.  For
example, 
to get one decimal place :

 histogram rep78, width(1) addlabel addlabopts(yvarformat(%4.1f))

I have no idea if this is available through the graph dialogue since I
don't use 
those, but it is easy to edit the resulting command and resubmit it.

M. Blasnik

----- Original Message ----- 
From: "Ronan Conroy" <rconroy@rcsi.ie>
To: "statalist hsphsun2. harvard. edu" <statalist@hsphsun2.harvard.edu>
Sent: Monday, February 11, 2008 5:19 AM
Subject: st: Controlling display format for -addlabel- option on
-histogram-


>A colleague was producing some bar charts using -histogram-, using 
> the -addlabel- option to add the actual values at the top of each
bar. (I 
>find this a futile exercise, but some folks like it.)
>
> He found that his labels were being added with two or even three
places of 
> decimals. For the life of me I cannot find how to use the - histogram-
graph 
> dialogue to control the display format. Can it be done?

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

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