A common requirement for publication is to show sample sizes on graphs. Here is an approach that might be adaptable to various types of graphs. Groupvar in the following is a string contained the group labels.
egen samplen = count(plotvar), by(groupvar)
gen labwithn = groupvar + " (" + string(samplen) + ")"
graph hbox plotvar, over(labwithn)t2("(sample size in brackets)")
With the added ability to exclude small samples, sort on sample size etc:
graph hbox plotvar if(samplen>10), over(labwithn)
Allan
***********************************************************************************
This email and any attachments are intended for the named recipient only. Its unauthorised use, distribution, disclosure, storage or copying is not permitted. If you have received it in error, please destroy all copies and notify the sender. In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent. All emails may be subject to monitoring.
***********************************************************************************
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/