Update Bar_Chart + Récup_mat.py
This commit is contained in:
parent
46e317f3e3
commit
176429dc52
|
@ -17,9 +17,17 @@ def simulation():
|
||||||
while iterations <= MaxIterations :
|
while iterations <= MaxIterations :
|
||||||
partie_globale()
|
partie_globale()
|
||||||
pass
|
pass
|
||||||
fig=plt.figure()
|
|
||||||
im=plt.imshow(HistoriqueGrille[0], interpolation = 'nearest', cmap = plt.cm.gray_r)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fig=plt.figure()
|
||||||
|
fig.suptitle('Animation des stratégies')
|
||||||
|
cmap = mpl.colors.ListedColormap(["black","green","blue","red"])
|
||||||
|
bounds=[0,1,2,3]
|
||||||
|
norm=mpl.colors.BoundaryNorm(bounds, cmap.N)
|
||||||
|
im=plt.imshow(HistoriqueGrille[0], interpolation = 'nearest', cmap = cmap , norm = norm)
|
||||||
|
plt.colorbar(img, cmap=cmap , norm=norm , boundaries = bounds , thicks = bounds)
|
||||||
|
|
||||||
def update(next_iteration):
|
def update(next_iteration):
|
||||||
im.set_array(cells)
|
im.set_array(cells)
|
||||||
return im
|
return im
|
||||||
|
|
Loading…
Reference in New Issue