[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" <>
To   <>
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.


Michael Blasnik..

You can use the slightly documented (see help histogram, last sentence
under Bar 
labels section) option addlabopts with the yvarformat suboption.  For
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" <>
To: "statalist hsphsun2. harvard. edu" <>
Sent: Monday, February 11, 2008 5:19 AM
Subject: st: Controlling display format for -addlabel- option on

>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-
> dialogue to control the display format. Can it be done?

*   For searches and help try:

*   For searches and help try:

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