Graphical presentation of the partition of the data set 𝒜 ⊂ ℝ

Input: partition Π;
Output: graphical presentation;
Submodules: none needed

Figure1[PI_]:=Module[{k=Length[PI],A,c,centri,tab,imin},
c=Table[Mean[PI[[j]]],{j,k}];
centri=Table[{c[[j]],.4},{j,k}];   
A=Flatten[PI,1];
sl1=ListPlot[Table[Table[{PI[[i,j]],.4},{j,Length[PI[[i]]]}],{i,Length[PI]}],PlotStyle->Table[{Hue[.3i+.3],PointSize[.03]},{i,Length[PI]}],AxesOrigin->{0,0},AspectRatio->Automatic,PlotRange->{0,1},Axes->{True,False},Ticks->{A,None}];
sl2=ListPlot[centri,PlotMarkers->{"✶",20},PlotStyle->{Gray,Opacity[.8]},Axes->{True,False},PlotRange->{0,1},AspectRatio->Automatic];
Print[Show[sl1,sl2,ImageSize->300]]
]