|
@@ -37,14 +37,14 @@ if __name__ == '__main__':
|
|
MIN_X, MAX_X = min(NODES_X), max(NODES_X)
|
|
MIN_X, MAX_X = min(NODES_X), max(NODES_X)
|
|
MIN_Y, MAX_Y = min(NODES_Y), max(NODES_Y)
|
|
MIN_Y, MAX_Y = min(NODES_Y), max(NODES_Y)
|
|
AX.scatter(NODES_X, NODES_Y,
|
|
AX.scatter(NODES_X, NODES_Y,
|
|
- marker='.', c='grey', linewidth=0.5, s=10, label='node')
|
|
|
|
|
|
+ marker='.', c='grey', linewidth=0.5, s=10)
|
|
|
|
|
|
# plot persons
|
|
# plot persons
|
|
PERSONS_X = [float(coord.split('|')[0]) for coord in P_XY_UNIQUE]
|
|
PERSONS_X = [float(coord.split('|')[0]) for coord in P_XY_UNIQUE]
|
|
PERSONS_Y = [float(coord.split('|')[1]) for coord in P_XY_UNIQUE]
|
|
PERSONS_Y = [float(coord.split('|')[1]) for coord in P_XY_UNIQUE]
|
|
SC = AX.scatter(PERSONS_X, PERSONS_Y,
|
|
SC = AX.scatter(PERSONS_X, PERSONS_Y,
|
|
alpha=0.75, s=P_XY_COUNTS*10,
|
|
alpha=0.75, s=P_XY_COUNTS*10,
|
|
- c=P_XY_COUNTS, cmap='YlOrRd', label='number of agents')
|
|
|
|
|
|
+ c=P_XY_COUNTS, cmap='rainbow')
|
|
|
|
|
|
# plot map
|
|
# plot map
|
|
img = plt.imread('input/map.png')
|
|
img = plt.imread('input/map.png')
|
|
@@ -63,5 +63,4 @@ if __name__ == '__main__':
|
|
AX.set_yticklabels(TICK_LABELS)
|
|
AX.set_yticklabels(TICK_LABELS)
|
|
AX.grid(True)
|
|
AX.grid(True)
|
|
plt.colorbar(SC)
|
|
plt.colorbar(SC)
|
|
- plt.legend()
|
|
|
|
plt.show()
|
|
plt.show()
|