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: stacked bar charts [was: Re: st: RE: Features for Stata 14]
From
Ronan Conroy <[email protected]>
To
"<[email protected]>" <[email protected]>
Subject
Re: stacked bar charts [was: Re: st: RE: Features for Stata 14]
Date
Thu, 20 Feb 2014 17:23:51 +0000
To Nick's excellent suggestions, I would add that help is at hand for those of us who have no colour sense at all (my wife sometimes humiliates me by asking me what colour, say, our kitchen is, and I never can tell her).
Colorbrewer (http://colorbrewer2.org/) and colorschemer (http://www.colorschemer.com/online.html) allow you to generate schemes that can then be used as Stata colours. ColorBrewer, in particular, generates excellent palettes.
And for those who want to specify colours other than those 'canned' with Stata, Stata will recognise RGB values. RGB values are sometimes separated by periods, commas, semicolons and nothing. Stata seems to prefer nothing, though it scheme files it appears to accept commas.
. sysuse auto, clear
. gr tw scatter price mpg, title("A title in red", color(207 16 45))
The -color- option gives the RGB values for the official Royal College of Surgeons red.
Both ColorBrewer and ColorSchemer will give you RCB values.
r
Prof. Ronan Conroy
Associate Professor of Biostatistics
RCSI Department of Epidemiology and Public Health Medicine
Royal College of Surgeons in Ireland
Lower Mercer Street, Dublin 2, Ireland
T: 01-402-2431
E: [email protected] W: www.rcsi.ie
RCSI DEVELOPING HEALTHCARE LEADERS
WHO MAKE A DIFFERENCE WORLDWIDE
On 2014 Feabh 20, at 08:34, Nick Cox wrote:
> Thanks for highlighting this. The following points are offered as
> elementary but fundamental on use of colour [color, if you prefer]:
>
> 1. For ordered sequences, rainbow or spectral sequences don't work
> well, whatever the underlying physics. Consider whether red - orange -
> yellow - green - blue - indigo - violet is a sequence of colours you
> would choose if you didn't know about rainbows or electromagnetism.
>
> 2. Red and green together are problematic for so many people that
> avoiding them as a combination should be a matter of course.
>
> 3. Strong colours work best only when used in small quantities.
>
> 4. Be wary of a colour combination in your graphs that you (or your
> partner, if possessed of more taste) would not allow in your home.
>
> 5. A sequence from (strong) blue to (strong) red often works well and
> matches many cultural or other conventions about what is (e.g.) good,
> bad, positive, or negative.
>
> 6. A sequence of various grays often works well too.
Ronán Conroy
[email protected]
Associate Professor
Division of Population Health Sciences
Royal College of Surgeons in Ireland
Beaux Lane House
Dublin 2
*
* 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/