Update Bar_Chart + Récup_mat.py

This commit is contained in:
NicolasBSN 2017-03-22 09:12:35 +01:00 committed by GitHub
parent 9ff02e1d3f
commit dda93033c4
1 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,8 @@ def matRecup(i, param):
return matR return matR
def animation_strat():
fig=plt.figure() fig=plt.figure()
fig.suptitle('Animation des stratégies') fig.suptitle('Animation des stratégies')
cmap = mpl.colors.ListedColormap(["black","green" ,"red" ,"blue" ,"yellow"]) cmap = mpl.colors.ListedColormap(["black","green" ,"red" ,"blue" ,"yellow"])
@ -44,7 +45,7 @@ cb.set_ticklabels(labels)
def update(next_iteration,*args): def update(next_iteration,*args):
img.set_array(matRecup(next_iteration , 'strategie')) img.set_array(matRecup(next_iteration , 'strategie'))
return [img] return [img]
anim = animation.FuncAnimation(fig, update, frames=range(MaxIterations), interval=1000, repeat = False) anim = animation.FuncAnimation(fig, update, frames=range(MaxIterations), interval=1000, repeat = False)