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]

Re: st: Fwd: graph/histogram: Can I change the color for each histogram bar/bin separately?


From   Austin Nichols <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Fwd: graph/histogram: Can I change the color for each histogram bar/bin separately?
Date   Tue, 24 Sep 2013 12:53:57 -0400

Victor Ciofoaia <[email protected]>:
See -byhist- on SSC or program your own using e.g.
http://www.stata.com/statalist/archive/2008-12/msg00341.html
http://www.stata.com/statalist/archive/2008-12/msg00332.html

On Tue, Sep 24, 2013 at 12:18 PM, Victor Ciofoaia <[email protected]> wrote:
> Hello everybody!
>
> I will skip the first thing I desperately burn to say "this is my
> first email to statalist, stata is great! " :)
>
> I need to do a graph and I managed to make it look nicely as I wanted
> with the by option, getting a 12 years trend:
>
> .histogram surgery_type, discrete by(year, total col(12))
>
> The histogram is actually done for just 4 values(1-4), but I would
> like to emphasize how the frequencies changed - a trend in the
> histogram and I could not figure out how to change the color bars in
> histogram. I can change the color for all the bars, but not for the
> 1st bin (ed reg), 2nd bin ( eg blue) etc... Is there a way to do this
> for a histogram?
>
> I assume I could somehow build a histogram from scratch, but that
> would be too complicated for me at my training point. BTW, is there an
> easy way to make your own histogram from scratch if changing color
> bars does not work?
*
*   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