# Plotting – How can I colorize the elements of the largest strongly connected component in ListPlot?

The following `Code`:

``````Clear(n, mm, eff, cau, maxRange, ce, deg45, vLabels);
SeedRandom(18);
n = 17;
mm = RandomReal(1, {n, n});
selectBetween((Theta)1_, (Theta)2_) :=
BoolEval((Theta)1 <= mm < (Theta)2);
vLabels = {1 -> AGR, 2 -> FIS, 3 -> CO1, 4 -> CO2, 5 -> MA1, 6 -> MA2,
7 -> EGW, 8 -> CST, 9 -> WHS, 10 -> HOT, 11 -> TSC, 12 -> FIN,
13 -> EST, 14 -> ADM, 15 -> EDU, 16 -> HLT, 17 -> OSER};

Manipulate(
sa = SparseArray(selectBetween((Theta)1, (Theta)2)*mm);
wG = Graph(sa("NonzeroPositions"), EdgeWeight -> sa("NonzeroValues"),
DirectedEdges -> True, EdgeStyle -> LightGray,
PlotLabel -> (Theta)1 <= Subscript(m, ij) < (Theta)2,
VertexLabels -> vLabels);
SCCs = ConnectedComponents(wG);
sccLargest = MaximalBy(Length)@SCCs // Flatten;
ao = {0, 0};
eff = Total(selectBetween((Theta)1, (Theta)2)*mm);
cau = Total(Transpose(selectBetween((Theta)1, (Theta)2)*mm));
maxRange = Max(Max(cau), Max(eff))*1.2;
ce = ListPlot(Table({cau((i)), eff((i))} -> i, {i, 1, n}) /. vLabels,
AspectRatio -> 1,
PlotRange -> {{-0.05, maxRange}, {-0.05, maxRange}},
PlotStyle -> PointSize(Large), PlotTheme -> "Detailed",
GridLinesStyle -> LightGray,
LabelingFunction -> Callout(Automatic, Automatic));
f(x_) := x;
deg45 = ListLinePlot(
Table({f(x), x}, {x, -0.05, maxRange*1.2, 0.01}),
PlotRange -> {{-0.05, maxRange}, {-0.05, maxRange}},
PlotStyle -> {Black, Dashed});
Grid({
{(Theta)1 <= Subscript(m, ij) < (Theta)2,
Show({ce, deg45}, PlotRange -> All,
LabelStyle -> Directive(Black, 12), AxesOrigin -> ao,
Axes -> True,
AxesStyle ->
Directive(Thick, Black, FontColor -> Black,
ColorFunctionScaling -> True),
AxesLabel -> {"Cause", "Effect"})}
} // Transpose),
{{(Theta)1, 0.025, "Threshold (Theta)1 !(*
StyleBox("(LessEqual)",nFontFamily->"Cambria",nFontSize->16,n
FontWeight->"Plain"))" <>
I want to give the elements a different color biggest `Strongly Connected Component` and create a legend for the biggest SCC.