I am trying to create a ggplot with a convex hull polygon. The data is the set of isotope values and I wanted to have the values grouped by their source.
The code I used:
ggplot(ff, aes(x=d13C, y=d34S,color=Source,shape=Source)) + geom_point()+ geom_polygon(data = ff,aes(fill =Source,colour =Source),alpha = 0.3,show.legend = TRUE)
But the convex hulls look weird and there are points not included.
How can I get the convex hulls corrected?