One of my little obsessions when drawing any chart is to get the color scheme defined at the beginning and stick with it. That way, I feel like I can hang out with the cool kids, also known as designers. Of course, they see straight through me, but I feel good about it anyway. Here’s my top tips:
- Get the logo of any organisation or project you are working with, and suck out the colours. I would just save that image, bring out the GIMP, and use the eye-dropper to get a few colors.
- If you don’t have some corporate colour to fall in with, try an app like Color Grab, which uses your phone’s camera to save the colours at the centre. You’re aiming for understated elegance, like design-seeds. If you don’t want to stand up from your computer, get one of the classic Crayola colours.
- Use a website like colorhexa.com to give you a palette that matches what you got from GIMP
- specify those colours in R, or CSS, or Stata; marvel at the results
- In general, use a fairly bland and limited palette throughout, except for where you want emphasis, and there use it sparingly and only one (or maybe at a strech two) colors
- Always save your graph in the native format of your data analysis package that made it, and in a vector graphics format like .svg, .pdf or .ps. You can always make raster images like .png later, but you can’t get back from them. (And always save the code that made the image – but you’d do that anyway, right?)
- Consider opening up the vector graphics version in Inkscape and messing about with the look there. In fact, if you have Stata or SPSS, you could add transparency in Inkscape.
- An unrelated point, but think hard about good fonts too. A nice design could be spoilt by a grim typeface. My current favourite is Transport Heavy, the official UK road sign font. And thanks to HM Government’s open data policies, it is free to download (not every ascii character is there – but you can substitute the similar free font Swansea for those).
- Make a decision about spelling the word. Only academics get the luxury of messing about.
The hexbin cholera map at the top of this blog is a fine old example of this process. I had at that time recently made some charts for a poster for my faculty, and used their lurid green (#acca56), which seemed perfect for a deadly water-borne infection (the Wal-Mart virus came to mind). (Believe it or not, at one point we had an entire wall in the reception area painted acca56, but I think it gave people migraines and had to go.) I looked up a palette, and allocated that to the number of cholera deaths in the hexagon. Pretty grim, which is to say, pretty and grim.