In [ ]:
%matplotlib inline
from pyevolve_plot import plot_errorbars_raw, plot_errorbars_fitness, \
plot_maxmin_raw, plot_maxmin_fitness, \
plot_diff_raw, plot_pop_heatmap_raw
In [ ]:
plot_errorbars_raw('tsp.db','ex1')
In [ ]:
plot_errorbars_fitness('tsp.db','ex1')
In [ ]:
plot_maxmin_raw('tsp.db','ex1')
In [ ]:
plot_maxmin_fitness('tsp.db','ex1')
In [ ]:
plot_diff_raw('tsp.db','ex1')
In [ ]:
import matplotlib.pyplot as plt
from PIL import Image
In [ ]:
import glob
images = glob.glob("tspimg/tsp_result_*.png")
In [ ]:
for im in images:
tsp_result = Image.open(im)
print("Generation %d" % int(im[18:-4]))
plt.imshow(tsp_result)
plt.show()
In [ ]:
print('Final best individual')
tsp_result = Image.open('tspimg/tsp_result.png')
plt.imshow(tsp_result);
In [ ]: