クラスタリングで正方形をセグメントに分ける
一様分布に従うランダムな点をクラスタ化して,正方形を n 個のセグメントに分ける.
data = RandomReal[{-1, 1}, {1000, 2}];plots = Table[ListPlot[FindClusters[data, n], AspectRatio -> 1, Frame -> True, Axes -> False, FrameTicks -> None, PlotStyle -> Directive[PointSize[Small]]], {n, 9}];GraphicsGrid[Partition[plots, 3]]