Open benmarwick opened 8 years ago
Definitely open to it. Take a look at @bbolker's geom_encircle
: https://github.com/hrbrmstr/ggalt/blob/master/R/geom_encircle.r (it may have solved some of the tech details).
Righto, I've got a proof-of-concept and examples here: https://gist.github.com/benmarwick/00772ccea2dd0b0f1745 Some of the defaults might not yet be optimal, do let me know if you have any feedback.
It is in DescTools (PlotBag) - https://cran.r-project.org/web/packages/DescTools/DescTools.pdf. Not a ggplot implementation however. BTW - PlotMiss with clust = T is also interesting.
I wonder if you might be interested in the addition of a
geom_bagplot
to draw bagplots, which are a kind of bivariate boxplot. I've drafted a basic geom that can draw a convex hull around a given proportion of points. That takes care of the 'bag' (which typically encloses 50% of the points), and now I'm working on getting the 'fence' (which is a hull that excludes outliers). If I can work it out (or someone else can), do you think it would make a suitable addition to ggalt?