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]

st: to change bar colors in a histogram


From   "Antonio Rodriguez Andres" <[email protected]>
To   <[email protected]>
Subject   st: to change bar colors in a histogram
Date   Fri, 14 Feb 2014 20:43:26 +0200

Dear Stata users

I am trying to create a histogram for the proportion of the population
having mental health problems (Yes or No). The mental
health measure is binary. I want to create a simple histogram with the bar
color different for each response Yes or No. That is my Stata
code

histogram MENTAL, discrete bcolor(blue) barw(0.5) addlabel percent xlabel (1
"Yes" 0 "NO") title("Mental Health Problems: Total Population")

Any advice

Thanks in advance

Antonio


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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