Fixed satisfaction color bar not taking into account the threshold.

This commit is contained in:
Filipe Rodrigues 2023-10-24 10:17:40 +01:00
parent 6309b5fd4c
commit 33db83ef14

View File

@ -156,7 +156,7 @@ def run(params: RunParams):
ax.imshow(graph.satisfaction_img())
# Add the color bar for the satisfaction
colors = [(1, 0, 0), (0, 0, 0), (0, 1, 0)]
colors = [(0.0, (1, 0, 0)), (graph.agent_ty.threshold(), (0, 0, 0)), (1.0, (0, 1, 0))]
fig.colorbar(
mpl.cm.ScalarMappable(
norm=mpl.colors.Normalize(vmin=0.0, vmax=1.0),