Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

AW: st: WG: Present n in graphs


From   "Kaulisch, Marc" <[email protected]>
To   <[email protected]>
Subject   AW: st: WG: Present n in graphs
Date   Mon, 16 May 2011 11:25:02 +0200

Nick, unfortunately in my concrete examples the best graphs need stacked graphs and then blabel does not help much, or do I miss something again?

sysuse auto
catplot rep78 foreign, perc(foreign) stack asyvars blabel(bar)


Marc
 

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Nick Cox
Gesendet: Montag, 16. Mai 2011 10:50
An: [email protected]
Betreff: Re: st: WG: Present n in graphs

-catplot- does not need such an option. You can reach through and use the -blabel(bar, )- option of -graph bar- or -graph bar-. There are examples in the help, which stresses that "[s]howing numbers as text as well by graphical elements can be helpful".

This works with the dot chart variant too.

Same applies to -statplot-.

Nick

On Mon, May 16, 2011 at 8:59 AM, Kaulisch, Marc <[email protected]> wrote:

> Does anybody know if there is an elegant way to present the number of 
> cases represented in a graph automatically?
>
> sysuse auto
> graph hbox mpg, over(foreign)
>
> Now I would like to add the count number of nonmissing cases of each 
> foreign category into the graph either to the labels or the boxplots, 
> bars etc.
> Of course I could do it manually, but I would like to know a more 
> automatic way.
>
> In tabplot (ssc), I find a showval-option that looks similar to what I 
> need, but I would like to use such an option in other types of graphs.
> Nick, if I may express a wish: maybe if possible a showval-option 
> would be a good addon to your -catplot- and -statplot- programs (both 
> ssc) ;-) Or have I missed something?
>
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index