Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Adding counts to an eclplot bar graph [solved]


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Adding counts to an eclplot bar graph [solved]
Date   Tue, 19 Apr 2005 20:38:55 +0100

At 20:18 19/04/2005, Benjamin Hulley wrote:
On Apr 19, 2005, at 11:33 AM, Benjamin Hulley wrote:

> I'm using eclplot to generate a bar chart and I'd like to add counts
> for the categories.  I was able to add counts to a symbol plot using
> marker labels, but haven't figured out a way to do it with a bar chart.

It seems inevitable that whenever I email this list, regardless of the
length of time I had spent on the problem and the number of times I've
gone through Statalist archives and Stata documentation, I immediately
solve it.

For those interested, text may be added to eclplot by using the added
text option (see help added_text_options) in "additional estimates
options" of eclplot.
Ben can also use the -plot()- option of -eclplot-, using marker labels. For instance, if the categories are in the variable -category- and the counts are in the variable -catcount-, then Ben might type:

eclplot estimate min95 max95 category, eplottype(bar) ///
plot(scatter max95 category, msymbol(none) mlabel(catcount) mlabpos(12))

and this would superimpose a scatter plot with labels and no symbols to insert the category counts just above the upper confidence limits.

Roger



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
King's College London

5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://phs.kcl.ac.uk/rogernewson/

Opinions expressed are those of the author, not the institution.

*
* 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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index