Bookmark and Share

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


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

Re: st: Labelling axes as percentages


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Labelling axes as percentages
Date   Wed, 17 Apr 2013 10:59:08 +0100

I should add that I added the -suffix()- option to -mylabels- because
people wanted it, but my own preference would be to show "%" or
"percent" once and once only on any graph axis.

Nick
[email protected]


On 17 April 2013 10:52, Nick Cox <[email protected]> wrote:
> I have suggested previously to StataCorp that percent[age]
> presentation is a matter for -format-, so that a percent format, say
>
> %2.1p     %2.0p
>
> would map (say) 0.234 or  0.236
>
> to show
>
> 23.4%  23%
>
> or
>
> 23.6% 24%
>
> But no success yet; we have no such -format- choice.
>
> However, -mylabels- (SSC) has a -suffix()- option but the downside is
> that in practice you need to do as much typing as with the direct
> solution. The help file has an example showing percents, so I won't
> repeat it here.
>
> -mylabels- might be useful in do-files or programs for automating
> production of many such graphs, but I do use it interactively.
>
>
> Nick
> [email protected]
>
>
> On 17 April 2013 10:36, Ronan Conroy <[email protected]> wrote:
>> It seems to me that I could save a certain amount of time if I could replace lines like
>>
>>         title("Figure 1" "Prevalence of DSM-IV Criterion C symptoms") ///
>>         ylabel(0 "0%" 20 "20%"  40 "40%" 60 "60%")
>>
>> with
>>
>>         title("Figure 1" "Prevalence of DSM-IV Criterion C symptoms") ///
>>         ylabel(0 (20) 60, aspercent)
>>
>> The wishful-thinking Stata option -aspercent- would label the axes interpreting values as percentages.
>>
>> Does anyone know a neat way of doing this?
>>
>> (I am already familiar with Nick's excellent SJ article on plotting on transformed scales (http://www.stata-journal.com/sjpdf.html?articlenum=gr0032).
>>
>>
>> Ronán Conroy
>> [email protected]
>> Associate Professor
>> Division of Population Health Sciences
>> Royal College of Surgeons in Ireland
>> Beaux Lane House
>> Dublin 2
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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