(This Post is part of my 30 day Data Visualization Challenge – you can follow along using the ‘challenge’ tag!)
Another built-in bit of ggplot2 is the ability to take any bar chart (geom_bar() or geom=”bar”) and convert it into something like this, called a coxcomb chart. It’s sort of like a pie chart, but with more information density:
Thoughts:
– I’m not totally sure when a chart like this is more appropriate (or more readable, or more understandable) than a simple bar graph of the same data. It’s definitely cool looking, but I don’t know if it conveys information in a meaningfully better way.
– When total data points collected vary so much (look at VS2 vs IF for example), it’s hard to tell how the smaller groups really compare to the larger ones. This is a problem with bar charts too, though.
Code:
> library(ggplot2) > p <- ggplot(diamonds, aes(clarity, fill=cut)) + geom_bar() > p > p + coord_polar()