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 on April 23, and its replacement, is already up and running.

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

st: graph bar

From   Stefan Haigner <>
Subject   st: graph bar
Date   Thu, 08 Apr 2010 20:13:41 +0200

Hi one and all!

I have a question concerning labelling option in combination with graph bar:

Here is my "problem": I want to draw a bar chart, whereby the height of the bar shows the fraction (i.e. percentage) within each category. In addition I want to increase the information of my chart by adding the number of observations on top of each bar chart. Is this possible?

And here is what I have so far:

#delimit ;
graph bar pd, over(cooperator, label(angle(forty_five) labsize(vsmall))) over(category, label(labsize(vsmall)))
  title("", span size(vsmall))
  subtitle("", span size(vsmall))
  ylabel(, labsize(vsmall))
  ytitle(relative frequency, size(vsmall))
  blabel(bar, position(outside) format(%9.2f) color(black) size(vsmall))
  note("", span size(vsmall)) ;
#delimit cr

I think that I have to change something with blabel, but I don't find the appropriate option.

Thank you very much in advance for your time!
Best, Stefan

Stefan D. Haigner
Faculty of Economics and Statistics
University of Innsbruck
Universitaetsstrasse 15
A-6020 Innsbruck
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index