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]
st: 3 different categorical variables same graph
From
Marcos Vinicius <[email protected]>
To
[email protected]
Subject
st: 3 different categorical variables same graph
Date
Wed, 9 May 2012 17:48:56 -0800
Hello,
I am trying to generate a bar chart where I have 3 different categorical variables (var1,var2,var3) on the X-Axis (Var 1 to Var 3 in the example below, letters identifies categories. The bar represents the proportion of the distribution.
I have tried graph bar and catplot without success.
catplot var1 var2 var3, ascategory percent blabel(bar, position(outside) format(%9.1f)) bargap(20) vertical
graph bar var1 var2 var3, asyvar bargap(20) blabel(bar,position(outside) format(%4.2f))
Please any help will be apreciate.
Vinicius
proportion
> ___
> | |
> | | ___ ___
> ___ |
> | | ___ | | | |
> | | |
> | | | | | | | ___
> ___ | |
> | ___ | | | | | | ___ | |
> | | | | ___
> | | | | | | | | | | | | |
> | | | | | |
> | | | | | | | | | | | | |
> | | | | | |
> | | | | | | | | | | | | |
> | | | | | |
> | | | |D| |E| |F| |G| |H|
> |A| |B| |C|
>
> --------------------------------------------------------------------------
> Var 2 Var 3
> Var 1
____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails
*
* 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/