Tuesday, October 4
Shadow

Animate PIL

# Plot
fig, ax = plt.subplots(2, figsize=(15,6))
ax[0].scatter(x1, y1, s=100, linewidths=3, c= 'orange')
ax[0].plot(x1, y1,'--', color = 'black')
for t, txt in enumerate(l1[:-1]):
    ax[0].annotate(t +1, (x1[t], y1[t]), size = 10, color = 'black')
ax[0].set(title = 'OR-Tool TSP Optimization Solution Route')

ax[1].scatter(x2, y2, s=100, linewidths=3, c= 'yellow')
ax[1].plot(x2, y2,'--', color = 'black')
for t, txt in enumerate(l2[:-1]):
    ax[1].annotate(t +1, (x2[t], y2[t]), size = 10, color = 'black')
ax[1].set(title = 'Next Closest Location Solution Route')
plt.show()

Leave a Reply