I have some scatter dots, and would like to get the the center points and distance between the center points and each dots.
I usegeom_mark_circle
to plot the circles for these dot, but the center points with x and y were not found.
my question is how to found the center points of the circle as shown here, and so I can calculate the distance between the center points and each dots.
for example:
dots <- data.frame(x = c(1,2,3,4), y =c(1,5,3,1))
ggplot2::ggplot(dots,mapping = aes(x = x,y = y)) +
ggforce::geom_mark_circle() +
geom_point()
3