(This Post is part of my 30 day Data Visualization Challenge – you can follow along using the ‘challenge’ tag!)
When we take a closer look at this data, adding a bit more complexity – here, price per carat rather than simply carat weight – helps us to see that even as the lower clarities become larger, their price per carat stays consistently low. It’s also interesting to see that there appears to be no relationship at all between price/carat and a stone’s depth.
Thoughts:
– The violin plot is added on top to help alleviate some of the dot density issues with such a large data set.
– Five days to go! Really this time 🙂
Code:
> p=ggplot(diamonds, aes(depth, price/carat)) > p + geom_point(color="gray", alpha=1/2) + facet_grid(.~clarity) + theme_bw() + geom_violin(color="blue", alpha=1/2)