[This article was first published on Stats and things
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
I’ve been bowling once per year at a charity event for the last few years and have kept track of the outcomes to share my group. I used ggplot2 to create a bar chart for the scores. Below are two graphs, one is dodged, the other is faceted. There’s no right way here, but you can see the code and decide for yourself which is more aesthetically pleasing.
First is the dodged one…
And next is the faceted one…
The color is redundant in the faceted one, since there are labels for the game number. I kept the color in to make comparison with the dodged one easier.
Here’s the code to produce these two graphs.