Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Labelling axes as percentages |
Date | Wed, 17 Apr 2013 10:52:59 +0100 |
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 njcoxstata@gmail.com On 17 April 2013 10:36, Ronan Conroy <rconroy@rcsi.ie> 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 > rconroy@rcsi.ie > 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/