聚类结果图
# load dat
data("iris")
iris = as.data.table(iris)
# Seeking boundary
hulls <- iris[, .SD[chull(Sepal.Length, Petal.Length)], by = "Species"]
# ggplot
ggplot() +
geom_point(data = iris, aes(x = Sepal.Length, y = Petal.Length, col = Species)) +
geom_polygon(data = hulls, aes(fill=Species), alpha = 0.5)