# How to ask Mathematica to show the results of two domains with different colors in the given code?

I want to ask Mathematica to show the results of two different domains (dom1 and dom2) with different colors

dom2 = Table[3 n, {n, 10/3}];
dom1 = Array[If[FractionalPart[#/3] == 0, Nothing, #] &, 10];

f[n_] := Piecewise[{{n \[Pi], MemberQ[n]@dom1}, {1, MemberQ[n]@dom2}}]
data = Table[{n, f[n]}, {n, 1, 10}];

ListLogPlot[data, PlotRange -> Full,
PlotMarkers -> {"\[FilledCircle]", 6}]


ListLogPlot[data,
PlotRange -> Full,
Joined -> True,
PlotStyle -> None,
BaseStyle -> PointSize[Large],


Alternatively, you can wrap each point in data with Style:

styleddata = data /. {a : {Alternatives @@ dom1, _} :> Style[a, Red],
a : {Alternatives @@ dom2, _} :> Style[a, Green]};

ListLogPlot[styleddata, PlotRange -> Full, PlotStyle -> PointSize[Large]]


or separate data into two sets as in Bob Hanlon's answer:

ListLogPlot[Cases[{Alternatives @@ #, _}] @ data & /@ {dom1, dom2},
PlotRange -> Full,
PlotStyle -> {Red, Green},
BaseStyle -> PointSize[Large]]


Clear["Global*"]

dom2 = Table[3 n, {n, 10/3}];

dom1 = Array[If[FractionalPart[#/3] == 0, Nothing, #] &, 10];

data1 = {#, # Pi} & /@ dom1;

data2 = {#, 1} & /@ dom2;


With different colors and shapes

ListLogPlot[{data1, data2}, PlotRange -> Full, PlotMarkers -> {Automatic, 8}]
`