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]

Re: st: histogram marker_label_options


From   "Niemierko, Andrzej" <ANIEMIERKO@PARTNERS.ORG>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: histogram marker_label_options
Date   Tue, 19 Jun 2012 16:33:22 +0000

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.


A.




On 6/18/12 9:44 PM, "Nick Cox" <njcoxstata@gmail.com> wrote:

>Apparently not. Here is one work-around:
>
>sysuse auto, clear
>
>preserve
>
>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)
>
>restore
>
>
>
>On Mon, Jun 18, 2012 at 9:40 PM, Niemierko, Andrzej
><ANIEMIERKO@partners.org> 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:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


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