Want to be able to see the “spread” of your data a little better?
Use the following code to draw ellipses over 95% of a given group. In this example we are circling by subject. Please note that you should only use color for your datapoints and not include shape, as the circles are distinguished from each other by color. Adding the shape will cause circles of multiple colors to be drawn, complicating the figure and potentially giving a technical error. Likewise, this can only be done when each group has a minimum prerequisite # of datapoints…if you have two few in a given group it will give you an error!
Note that this is not a test for significance.
miso.pcoa <- ordinate(miso, method="PCoA", distance="bray")
plot_ordination(miso, miso.pcoa,
color = "subject",
title="title") +
stat_ellipse(type="t", level=0.95)
