Last branch
Une version un peu plus simplifier de l'autre branche. Voici la liste des commandes à faire pour tout avoir :
>>> from ultimate_tournament_simulator import simulators
>>> from ultimate_tournament_simulator import Plot
>>> s = simulators.all_tournaments_with_perfect_preranking()
>>> s.extend(simulators.all_tournaments_with_random_preranking())
>>> data = []
>>> my_plots = []
>>> histos = []
>>> charts1 = []
>>> charts2 = []
>>> for i in range(len(s)):
... data.append(s[i].simulate_all_tournament())
... my_plots.append(Plot(data[i]))
... histos.append(my_plots[i].plot_results_as_histograms())
... charts1.append(my_plots[i].plot_firsts_as_horizontal_bar_chart())
... charts2.append(my_plots[i].plot_fixed_points_as_bar_chart())
Pour sauvegarder :
>>> for i in range(len(s)):
... histos[i].savefig("Images/Histograms/Histogram_{}.png".format(i))
... charts1[i].savefig("Images/Percentages_of_win/Percentage_{}.png".format(i))
... charts2[i].savefig("Images/Ratios/Ratio_{}.png".format(i))
Pour afficher :
>>> for i in range(len(s)):
... histos[i].show()
... charts1[i].show()
... charts2[i].show()