I have a data set of type (x,y,E), where E can assume 4 distinct configurations (0,0), (1,0), (0,1) or (1,1). I want to create a 2D plot using ListPlot considering the rules:
- If E=(0,0), then print red
- If E=(1,0), then print blue
- If E=(0,1), then print green
- If E=(1,1), then print black the respective coordinate (x,y). See illustrative Figure below
data=Uncompress[FromCharacterCode[
Flatten[ImageData[Import["https://i.stack.imgur.com/hQ9L8.png"], "Byte"]]]]
The code doesn't work
ListPlot[Partition[data[[All ;; 2]], 2, 1],
PlotStyle -> (Rest[
data[[All, -1]]] /. {{0, 1} -> Green, {1, 0} -> Blue, {0, 0} ->
Red, {1, 1} -> Black})]
Can anybody help me?