Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

RE: st: histogram marker_label_options

From   Nick Cox <>
To   "" <>
Subject   RE: st: histogram marker_label_options
Date   Tue, 19 Jun 2012 18:29:29 +0100

You might say that, but I couldn't possibly comment.


Niemierko, Andrzej

Thanks, Nick. It's a fine working work-around. I guess the option to
control format of hight labels in histogram plots is just an easy to fix
omission by StataCorp.

On 6/18/12 9:44 PM, "Nick Cox" <> wrote:

>Apparently not. Here is one work-around:
>sysuse auto, clear
>clonevar mpg2 = mpg
>replace mpg2 = 1 + 2 *  floor(mpg/2)
>contract mpg2, percent(percent)
>gen spercent = string(percent, "%2.1f")
>twoway bar percent mpg2, barw(2) bstyle(histogram) ///
>|| scatter percent mpg2, ms(i) mlab(spercent) mlabpos(12) ///
>yla(, ang(h) format(%2.0f)) legend(off)
>On Mon, Jun 18, 2012 at 9:40 PM, Niemierko, Andrzej
><> wrote:
>> Is it possible to change the default numeric format for hight labels
>>when plotting a histogram with y-axis expressed in percent and with
>>added hight labels shown above each bar?

*   For searches and help try:

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