Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: percent symbols in catplot |

Date |
Fri, 26 Feb 2010 21:34:59 +0100 |

<> We have been here before: http://www.stata.com/statalist/archive/2008-07/msg00001.html I failed to bring this up at the last wishes & grumbles in Florence. A -format- that adds the percentage sign, just like in spreadsheet software... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Eric Booth Sent: Freitag, 26. Februar 2010 21:12 To: statalist@hsphsun2.harvard.edu Subject: st: percent symbols in catplot > I am using -catplot- (from SSC) on Stata 11 MP for Mac OSX. I'd like to show the percent sign in the label for each of the category bars when using the "percent" option. For example, **** webuse auto, clear catplot bar rep78, percent blabel(bar, position(outside) format(%9.1f)) **or** catplot bar rep78, by( for) percent blabel(bar, position(outside) format(%9.1f)) **** shows the percent of each rep78 category out of 100, but I can't get it to show the % sign, so it could say "43.5%", etc. Using graph editor, I found that I can add a % sign to the bar label text manually (though I'd rather not have to do that for many graphs), but after looking through the barlabel options help documentation, I couldn't figure out how to change the bar label automatically. (I had the idea that if I could override the bar labels like you can the text for a key in a legend then I could calculate and substitute these values into the -catplot- command in a loop, but I haven't found a way to do this using the barlabel option) Another option might be to write something that automates those graph recorder grec file changes (ex: when I add the "%" by hand, it issues the command: .plotregion1.barlabels[3].text.Arrpush 43.5% in the recording), but this is a pain. Any suggestions? Thanks, Eric __ Eric A. Booth Public Policy Research Institute Texas A&M University ebooth@ppri.tamu.edu Office: +979.845.6754 * * 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/ * * 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/

**References**:**st: percent symbols in catplot***From:*Eric Booth <ebooth@ppri.tamu.edu>

- Prev by Date:
**st: percent symbols in catplot** - Next by Date:
**Re: st: Statistical consulting fees** - Previous by thread:
**st: percent symbols in catplot** - Next by thread:
**st: RE: percent symbols in catplot** - Index(es):