|
@@ -277,15 +277,15 @@ def main():
|
|
|
figure, axes = plt.subplots(3, 1, True)
|
|
|
|
|
|
for i in range(0, 3):
|
|
|
- axes[i].plot(range(1, 11), solution_steps[i], label = "Steps to Solution")
|
|
|
- axes[i].set_xlabel("Problem Instance")
|
|
|
+ axes[i].plot(range(1, 11), solution_steps[i], label = "Steps to Solution", color = 'b')
|
|
|
+ axes[i].set_xlabel("Problem Instance w/ " + i + " cities")
|
|
|
axes[i].set_ylabel("Steps Taken", color = 'b')
|
|
|
axis_twin = axes[i].twinx()
|
|
|
- axis_twin.plot(range(1, 11), solution_scores[i], label = "Solution Cost/Distance")
|
|
|
+ axis_twin.plot(range(1, 11), solution_scores[i], label = "Solution Cost/Distance", color = 'r')
|
|
|
axis_twin.set_ylabel("Distance in units", color = 'r')
|
|
|
axes[i].legend()
|
|
|
+ axis_twin.legend()
|
|
|
|
|
|
- #axes.legend()
|
|
|
plt.savefig("hill_climbing.pdf")
|
|
|
|
|
|
main()
|