# Drawing the basin boundaries

In my case, I need to use the following data file

Let's plot the basins

m = ReadList["LGs.dat", Number, RecordLists -> True];
getColor[m_List, i_Integer] :=
Module[{s = m[[i, 3]]},
Which[s == 4, Darker[Green], s == 6, Blue, s == 8, Cyan, s == 10,
Orange, s == 12, Purple, s == 14, Red, True, Black]];
data = Table[{PointSize[0.005], getColor[m, i],
Point[{m[[i, 1]], m[[i, 2]]}]}, {i, 1, Length[m]}];
S0 = Graphics[data];
P0 = Show[{S0}, Axes -> False, Frame -> True,
FrameLabel -> {"α", "δ"}, FrameStyle -> Thick,
RotateLabel -> False,
LabelStyle -> Directive[FontFamily -> "Helvetica", 22],
AspectRatio -> 1, PlotRange -> All, PlotRangeClipping -> True,
PlotRangePadding -> 0, ImageSize -> 500]


My question is: how can I draw a black solid line, thus highlighting the basin boundaries?

EDIT

Following @yarchik 's suggestion I get the following output

As you can see, the boundary lines are very ugly. Is there a way to obtain nice, smooth solid lines inicating the basin boundaries?

## Out-of-box solution (left figure):

ListContourPlot[m[[All, 1 ;; 3]],
ContourStyle -> Directive[Black, Dashed],
ColorFunction -> "Rainbow",
ImageSize -> Small,
FrameLabel -> {"α", "δ"},
PlotTheme -> "Monochrome"]


This is pure esthetics consideration that the contours are dashed, the image is small, the theme is monochrome. It is fully customizable within ListContourPlot as shown below for different colors.

## Explicitly specify the ColorFunction(right figure)

ListContourPlot[m[[All, 1 ;; 3]],
ContourStyle -> Directive[Black, Dashed],
ColorFunction -> (Which[# < 5, Darker[Green], # < 7, Blue, # < 9,
Cyan, # < 11, Orange, # < 13, Purple, # < 15, Red, True,
Black] &),
ColorFunctionScaling -> False,
ImageSize -> Small,
FrameLabel -> {"α", "δ"},
PlotTheme -> "Monochrome"]

• Is there a way to control the choice of colors for each basin? – Vaggelis_Z Feb 28 '20 at 8:33
• Could you please indicate how can I define the custom color function? – Vaggelis_Z Feb 28 '20 at 9:18
• See also my edit. – Vaggelis_Z Feb 28 '20 at 10:22