It'd be good to pull this out into its own function, so it's easier to test, or generally, use from outside stat_ellipse