biocore / American-Gut

American Gut open-access data and IPython notebooks
Other
113 stars 81 forks source link

Generate ovals dynamically from PCoA data #68

Closed cuttlefishh closed 8 years ago

cuttlefishh commented 10 years ago

Currently the ellipses (ovals) bounding the data in the PCoA plots are drawn manually in Illustrator and positioned in Latex until they pass the eyeball test. It would be great if the ellipses could be generated dynamically from the first and second coordinates (i.e. flattening the plot into 2 dimensions). Presumably the major axis of the ellipse would coincide with the linear regression of points, and the minor axis then bisects that perpendicularly. Then it's a matter of capturing e.g. 99% of the points. It seems plausible and would look better, be more accurate, and save us time down the road.

cuttlefishh commented 8 years ago

Ovals are now generated using matplotlib KDE plot in scripts/mod2_pcoa.py