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]
Re: st: histogram of tabular data
From
Sergiy Radyakin <[email protected]>
To
[email protected]
Subject
Re: st: histogram of tabular data
Date
Mon, 29 Nov 2010 18:03:39 -0500
On Mon, Nov 29, 2010 at 5:36 PM, Hillel Alpert <[email protected]> wrote:
> Could anyone advise if Stata can be used to generate a histogram showing multiple bars per category of the variable being plotted? Each bar would be the frequency or percentage of the variable for a subcategory of a second variable.
>
> For example, the histogram would show the numbers of boys and girls in each of ten classrooms, where the bars for boys and girls of each classroom are adjacent to one another.
>
> Hillel
Try the following example:
sysuse auto, clear
graph bar turn gear_ratio, over(rep78)
in your data replace "turn" with boys, "gear_ratio" with girls and
"rep78" with classroom.
Refer to M.Mitchell's book for graphical questions:
http://books.google.com/books?id=D0aYj9TDjdEC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false
See section 5.2 in particular.
Best, Sergiy Radyakin
>
> *
> * 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/