Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: stacked bar charts [was: Re: st: RE: Features for Stata 14] |
Date | Thu, 20 Feb 2014 08:34:57 +0000 |
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. Nick njcoxstata@gmail.com On 19 February 2014 15:51, Ronan Conroy <rconroy@rcsi.ie> wrote: > Note the neat trick in Nick's example for grading the colours in your chart by using different intensities of the same colour. > > bcolor(blue*.2) produces a 20% blue and yes, bcolor(blue*2) produces an extra intense blue. > > It's one of the things I wish I had known earlier. > > 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: rconroy@rcsi.ie W: www.rcsi.ie > > RCSI DEVELOPING HEALTHCARE LEADERS > WHO MAKE A DIFFERENCE WORLDWIDE > On 2014 Feabh 18, at 16:29, Nick Cox wrote: > >> . catplot rep78 foreign, asyvars stack percent(foreign) /// >> bar(1, bcolor(red*0.4)) bar(2, bcolor(red*0.2)) /// >> bar(3, bcolor(blue*0.2)) bar(4, bcolor(blue*0.4)) bar(5, bcolor(blue*0.6)) /// >> legend(row(1)) > > Ronán Conroy > rconroy@rcsi.ie > 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/ * * 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/