Ulrich Dangel

10 July 2013

Choosing chart colors with R

Every time I create charts for visualisation I have a problem choosing appropriate colors for the data. Ever since I started to use ggplot2 the problem went away as ggplot2 tries best to choose appropriate color, and has a wide range of available color themes.

Unfortunately you can’t use ggplot2 all the time, e.g. when you want to plot a dendrogram or use another platform than R. While looking for a way to color my dendrogram with the color choices from ggplot2, I discovered the scales package. scales can be easily used to get the colors from ggplot2, determine breaks for axes or labels.

The following codes plots the colors, with brewer_pal() returning a vector of the requested colors and show_col() plots them.

Diverging colors to express similarity in the middle but extreme cases at the beginning and the end:



Qualitative pattern to distinguish between different classes:



and last but not least, a sequential color palette to express progressing data:



15 May 2013

Debian Ireland Meetup Friday 17th of May

Thanks to Federico the Debian Irish User Group celebrates the Wheezy release with some pints this Friday (17.05.2013) at 8 at Mac Turcaill’s. For more information and a link to the pub have a look at the mailing list posting from Federico.

Oh and by the way: the Irish Debian Community officially launched last year, i.e. debian-dug-ie is #newinwheezy.