ggplot dodged vs faceted bar chart

April 17, 2013
By

(This article was first published on Stats and things, and kindly contributed to R-bloggers)

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.
The full code with the data is available in my github repo.
@corynissen on twitter

To leave a comment for the author, please follow the link and comment on their blog: Stats and things.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)