April 16, 2012

Joy of colour

I felt I had to share this gorgeously simple trick for finding the colour name you need in R.


col.wheel <- function(str, cex=0.75) {
   cols <- colors()[grep(str, colors())]
   pie(rep(1, length(cols)), labels=cols, col=cols, cex=cex)
#then just do:
#or whatever.

Kudos to http://www.stubbornmule.net/2011/11/colour-wheels-in-r/

dataviz nerdvana

Previous post
Outcome Mapping book chapter just out Powell, Steve, Joakim Molander, and Ivona Čelebičić. ‘Assessment of Outcome Mapping as a Tool for Evaluating and Monitoring Support to Civil Society
Next post
Linus on having a vision or not Right now I am doing a short consultancy helping IFRC with a Learning Conference in Haiti. So we are having some interesting discussions on what a

This blog by Steve Powell is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, syndicated on r-bloggers and powered by Blot.
Privacy Policy