-
Notifications
You must be signed in to change notification settings - Fork 0
/
heatmap.py
31 lines (21 loc) · 931 Bytes
/
heatmap.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
from matplotlib import pylab
from numpy import random
decays = [0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95]
explores = [0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95]
likelihoods = random.randn(19,19)
title_str = "something"
pylab.figure()
pylab.title(title_str)
hm = pylab.pcolormesh(likelihoods, cmap='nipy_spectral')
ax = pylab.gca()
ax.axis('tight')
cb = pylab.colorbar(hm)
cb.ax.set_ylabel('log-likelihood')
pylab.tick_params(which='both', bottom='off', top='off', left='off', right='off', \
labeltop='off', labelbottom='off', labelleft='off', labelright='off')
pylab.xlabel("explore probability (%0.2f - %0.2f)" % (min(explores), max(explores)))
pylab.ylabel("pheromone decay (%0.2f-%0.2f)" % (min(decays), max(decays)))
print "show"
pylab.show()
pylab.close()