ggplot2 awesomeness at play!
Love this way how when combining #ggplot2 in #R with #gridExtra you can easily (very easy!!) add these density plots (thanks +Aylwyn Scally for pointing that out) on the top and side of your plot. Just pure awesome 🙂
For R code look at +Michael Kuhn blog:
http://blog.mckuhn.de/2013/04/2d-plot-with-histograms-for-each.html
8 Replies to “ggplot2 awesomeness at play!”
That's awesome, will have to check it out tomorrow
v nice; would be better if they actually were histograms though. I'm on a mission to ban density curves from science.
So I have to ask +Aylwyn Scally , why ban density curves?
+Steven Porter
+Aylwyn Scally with "kind of histogram" I indeed should have used the correct term density curves. Will fix that!
+Aylwyn Scally ,good luck with that lol
+James Holland because people often use them to show their data, and in that context what they do is hide the data – e.g. how much there is and exactly where. Particularly problematic at the edges of a data set. For example here it could be significant that there are no red points < 21 mpg; maybe the expt went wrong; the density curve obscures that.
Density estimation is an inference or fitting procedure, so fine to use it in that context.
gridExtra, I am yet to try it out.