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

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

From   "Michael Blasnik" <>
To   <>
Subject   st: Re: Controlling display format for -addlabel- option on -histogram-
Date   Mon, 11 Feb 2008 08:01:39 -0500


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" <>
To: "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:

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