Here's a toy example with
mtcars. Suppose everything to the left of 200 on the x-axis ('disp' here) is a cluster, and everything to the right of 200 is a different cluster.
ggplot(mtcars, aes(x=disp, y=qsec)) + geom_point() + geom_vline(xintercept=200)
Is there some way to draw borders ("gate") around the two groups in a non-uniform way? I've seen ways to draw circles or ellipses, but these are always uniform. I think some solution may lie within the
ggforce package, but I'm not sure how to implement that.
Looking for something like this: