DVC Day 21: Spice of Life, etc etc

(This Post is part of my 30 day Data Visualization Challenge – you can follow along using the ‘challenge’ tag!)

In exploring the R ecosystem, I find myself exposed to lots of different ways of doing things, along with a real diversity of opinion on how to best present data. I’m working on studying up on that but for now, I’m satisfied giving lots of different things a try. In noodling around on R Bloggers, I found Dean Attali and his ggplot2 add-on library, ggExtra, that lets us do stuff like this:

Screen Shot 2015-05-04 at 8.01.24 PM

Thoughts:
– It really is remarkable how powerful open source software is. When you’re steeped in it every day, it becomes almost second nature, the obvious way.
– I like the sidebar histograms; they present a novel reply to dot density problems. I can see them being useful in a great number of cases, especially with larger, more spread out scatter plots.

Code:

> library(ggplot2)
> library(ggExtra)
> p <- ggplot(diamonds, aes(carat,price)) + geom_point() + theme_classic()
> ggExtra::ggMarginal(p, type="histogram")

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.