def heatmap_N_r_images(Ns, rs, mus, mutation_func=uniform_mutations, test_func=None): for i in range(len(mus)): print i mu = mus[i] data = compute_N_r_heatmap_data(Ns, rs, mutation_func=mutation_func, mu_ab=mu, mu_ba=mu, test_func=test_func) pyplot.clf() heatmap.main(data=data, xindex=1, yindex=0, cindex=-1, xfunc=float, yfunc=int, cfunc=float) index = ensure_digits(len(mus),i) pyplot.savefig("heatmap_%s.png" % index, dpi=400)
def heatmap_N_mu_images(r=1., mutation_func=boundary_mutations, test_func=None): #Ns = range(3, 1000,10) Ns = [int(3 + math.pow(1.5, x)) for x in range(0, 30)] mus = [math.pow(.4, x) for x in range(3, 22)] #mus = [0.2, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.005, 0.001, 0.0001, 0.00001] #mus = [0.1, 0.01,] data = compute_N_mu_heatmap_data(Ns, mus, r, mutation_func=mutation_func, test_func=test_func) pyplot.clf() heatmap.main(data=data, xindex=2, yindex=0, cindex=-1, xfunc=float, yfunc=int, cfunc=float) pyplot.savefig("heatmap_N_m" + ".png", dpi=400)
def heatmap_N_r_images(Ns, rs, mus, mutation_func=uniform_mutations, test_func=None): for i in range(len(mus)): print i mu = mus[i] data = compute_N_r_heatmap_data(Ns, rs, mutation_func=mutation_func, mu_ab=mu, mu_ba=mu, test_func=test_func) pyplot.clf() heatmap.main(data=data, xindex=1, yindex=0, cindex=-1, xfunc=float, yfunc=int, cfunc=float) index = ensure_digits(len(mus), i) pyplot.savefig("heatmap_%s.png" % index, dpi=400)