Years as coloured bars
I keep seeing years represented by coloured bars. First it was that demographic tsunami chart. Then there are examples like the one on the right, which came up in a web search today. I even saw one (whispers) at work today.
I get what they are trying to do – illustrate trends within categories over time – but I don’t think years as coloured bars is the way to go. To me, progression over time suggests that time should be an axis, so as the eye moves along the data from one end to the other, without interruption. What I want to see is categories over time, not time within categories.
So what is the way to go? Let’s ask “what would ggplot2 do?”
The following charts illustrate different ways to visualise the same data using ggplot2. My motivation here is to show you that if you don’t immediately know or see a “right way” to do something, tools such as ggplot2 make it easy to “feel your way” to a solution, through exploration.
The charts and their accompanying code are available at RPubs. Click each image at right for a full-size version.
To start, we can create our own “years as coloured bars” chart, using some toy data.
It looks better already just for being generated using ggplot2. But can we go better?
Your first thought might be “why not just swap the years and categories around?” And sure, that gives us time along an axis. Now though, it’s a little difficult to follow each categ...
Source: What You're Doing Is Rather Desperate - Category: Bioinformatics Authors: nsaunders Tags: R statistics ggplot2 visualisation Source Type: blogs
More News: Bioinformatics | Statistics