daattali / ggExtra

📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
http://daattali.com/shiny/ggExtra-ggMarginal-demo/
Other
383 stars 45 forks source link

Add marg mapping #65

Closed crew102 closed 7 years ago

crew102 commented 7 years ago

This PR implements the feature mentioned in #61. Two notes:

  1. I had to hard-code the size of the lines that cover up the outline created by geom_density here:

https://github.com/crew102/ggExtra/blob/0d9579743824b4a6d23655a43a4275ed4d3fb7b9/R/ggMarginalHelpers.R#L167-L172

The size of the covering line(s) has to be a little bit bigger than the size of the line used by geom_density to actually cover the line on some graphics devices (e.g., svg and pdf in some cases).

  1. I will update the docs after this this PR is merged.
daattali commented 7 years ago

That's quite a PR! I'm acknowledging that I received the PR so that you know I've seen it, I'll take a look hopefully on the weekend. Thank you!